question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid chunk type

See original GitHub issue

Information Apktool Version (apktool -version) - v2.4.0 Operating System (Mac, Linux, Windows) - Windows and Linux APK From? (Playstore, ROM, Other) - Google Play store https://play.google.com/store/apps/details?id=com.bukalapak.android&hl=in

root@jeruk:/home/sihar# apktool d bukalapak.apk 
I: Using Apktool 2.4.0 on bukalapak.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Invalid chunk type: expected=0x00000200, got=0x00000203
        at brut.androlib.res.decoder.ARSCDecoder.checkChunkType(ARSCDecoder.java:542)
        at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:88)
        at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:82)
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
        at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:748)
        at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:67)
        at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:59)
        at brut.androlib.Androlib.getResTable(Androlib.java:68)
        at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:228)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:118)
        at brut.apktool.Main.cmdDecode(Main.java:167)
        at brut.apktool.Main.main(Main.java:76)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
iBotPeachescommented, Jul 15, 2021

Thank you! Could you share the commit that fix this, so we can build a hotfix version locally? @iBotPeaches

Sorry man, but this just seems odd. Did you read this bug report you responded to?

I responded earlier with all the details here (https://github.com/iBotPeaches/Apktool/issues/2099#issuecomment-791965193) and that link included the PR (https://github.com/iBotPeaches/Apktool/pull/2527) that I marked as fixing a good portion of this ticket.

However, why just pluck a singular commit? I’m sure you’ll want the other fixes and enhancements in the master branch vs 1 commit for 1 issue. I can’t predict what 1 commit applied on top of 2.5.0 will even do.

Then finally, we’ve been building builds for each commit to master under the “Build” job. You can see the last commit to master job trigged a binary and archived it here - https://github.com/iBotPeaches/Apktool/actions/runs/1002640994 so you don’t really need to build them locally. You can test bleeding edge builds for every master commit.

4reactions
iBotPeachescommented, Jun 5, 2019

Damn this apk is weird. It has like 60+ dynamic references.

Package Group 67 id=0x5a packageCount=1 name=com.bukalapak.android.feature_train
  DynamicRefTable entryCount=67:
    0x7d -> com.bukalapak.android.feature_auth
    0x5d -> com.bukalapak.android.feature_auto_promo_campaign
    0x7c -> com.bukalapak.android.feature_automatic_review
    0x76 -> com.bukalapak.android.feature_brand_page
    0x75 -> com.bukalapak.android.feature_brand_search
    0x71 -> com.bukalapak.android.feature_bukabike
    0x7b -> com.bukalapak.android.feature_bukadonasi
    0x70 -> com.bukalapak.android.feature_bukajabar
    0x7a -> com.bukalapak.android.feature_bukamall
    0x79 -> com.bukalapak.android.feature_bukamart
    0x78 -> com.bukalapak.android.feature_bukamobil
    0x6f -> com.bukalapak.android.feature_bukanonton
    0x42 -> com.bukalapak.android.feature_bukareksa
    0x77 -> com.bukalapak.android.feature_bukareview
    0x6e -> com.bukalapak.android.feature_bukastruk
    0x5c -> com.bukalapak.android.feature_bus
    0x73 -> com.bukalapak.android.feature_cart
    0x49 -> com.bukalapak.android.feature_category
    0x72 -> com.bukalapak.android.feature_chat
    0x6d -> com.bukalapak.android.feature_checkout_marketplace
    0x57 -> com.bukalapak.android.feature_complaint
    0x4a -> com.bukalapak.android.feature_convenience_store_courier
    0x6c -> com.bukalapak.android.feature_dana
    0x3e -> com.bukalapak.android.feature_deals
    0x5e -> com.bukalapak.android.feature_discount_products
    0x6b -> com.bukalapak.android.feature_discover
    0x59 -> com.bukalapak.android.feature_event
    0x45 -> com.bukalapak.android.feature_financial_calculator
    0x50 -> com.bukalapak.android.feature_flashdeal
    0x5b -> com.bukalapak.android.feature_flight
    0x6a -> com.bukalapak.android.feature_friendship
    0x69 -> com.bukalapak.android.feature_fun_room
    0x3b -> com.bukalapak.android.feature_funding
    0x68 -> com.bukalapak.android.feature_game_voucher
    0x67 -> com.bukalapak.android.feature_garage_sale
    0x66 -> com.bukalapak.android.feature_home
    0x63 -> com.bukalapak.android.feature_inspiration
    0x62 -> com.bukalapak.android.feature_insurance
    0x44 -> com.bukalapak.android.feature_merchant_page
    0x58 -> com.bukalapak.android.feature_my_coupons
    0x74 -> com.bukalapak.android.feature_omnisearch
    0x46 -> com.bukalapak.android.feature_postpaid
    0x52 -> com.bukalapak.android.feature_premium_seller
    0x4d -> com.bukalapak.android.feature_prepaid_electricity
    0x40 -> com.bukalapak.android.feature_prepaid_phone_credit
    0x3f -> com.bukalapak.android.feature_priority_buyer
    0x61 -> com.bukalapak.android.feature_product_category
    0x60 -> com.bukalapak.android.feature_product_detail
    0x43 -> com.bukalapak.android.feature_product_discount
    0x65 -> com.bukalapak.android.feature_product_organizer
    0x41 -> com.bukalapak.android.feature_product_review
    0x54 -> com.bukalapak.android.feature_profile
    0x5f -> com.bukalapak.android.feature_promo
    0x4f -> com.bukalapak.android.feature_promoted_push
    0x4e -> com.bukalapak.android.feature_push
    0x64 -> com.bukalapak.android.feature_referral
    0x7e -> com.bukalapak.android.feature_sample
    0x47 -> com.bukalapak.android.feature_sell_product
    0x55 -> com.bukalapak.android.feature_seller_transaction
    0x53 -> com.bukalapak.android.feature_sellersubsidize
    0x4c -> com.bukalapak.android.feature_serbu_seru
    0x56 -> com.bukalapak.android.feature_smart_printer
    0x51 -> com.bukalapak.android.feature_smartcard
    0x4b -> com.bukalapak.android.feature_spin_win
    0x3c -> com.bukalapak.android.feature_syariah
    0x3d -> com.bukalapak.android.feature_topup_emoney
    0x5a -> com.bukalapak.android.feature_train

Confirmed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Photoshop will not open some PNG files "Invalid chunk type"
Every time I try to open these PNG files back in Photoshop, I always get the following error message "Invalid chunk type".
Read more >
Some PNG files report "invalid chunk type" when loading #586
This file contains an invalid eXIf png chunk. This chunk has an invalid length. A lot of libraries just ignore this chunk. The...
Read more >
ImageIO: PNG [5C][30][0D]I: invalid chunk type mean? - Stack ...
UPDATE: When i construct a UIImage in the didFinishPickingMedia method using 'webData', it doesn't give an error and the image is create sans...
Read more >
PNG image with invalid chunk type is not loaded in Firefox ...
PNG image with invalid chunk type is not loaded in Firefox. Chrome ignores error and displays image. Summary: PNG image with invalid chunk...
Read more >
Chunk Types - PNGme: An Intermediate Rust Project
Your chunk types should always be valid chunks. It should not be possible to construct an invalid chunk type using your public interface....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found