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.

App crashed on release mode

See original GitHub issue

Hi @DylanVann , I used this library in my app and it’s work well on debug mode but, after create release apk and install on device app crashed without any error when I navigate to page include fast image. (I comment fast image on that pages and app works without any problem)

Can you help me to fix this? Are you any Verbose mode for see some logs in release mode and find problem?

Also this is my react and react-native and fast image version:

"react": "16.3.1",
"react-native": "0.55.1",
"react-native-fast-image": "^4.0.0",
"react-native-image-progress": "^1.1.0",

Update: I see my logcat and find this error:

628 E AndroidRuntime: Caused by: java.lang.RuntimeException: Unable to instantiate GlideModule implementation for class com.dylanvann.fastimage.OkHttpProgressGlideModule
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.bumptech.glide.module.ManifestParser.parseModule(ManifestParser.java:53)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.bumptech.glide.module.ManifestParser.parse(ManifestParser.java:30)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.bumptech.glide.Glide.parseGlideModules(Glide.java:187)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.bumptech.glide.Glide.get(Glide.java:166)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.bumptech.glide.RequestManager.<init>(RequestManager.java:62)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.bumptech.glide.RequestManager.<init>(RequestManager.java:53)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.bumptech.glide.manager.RequestManagerRetriever.getApplicationManager(RequestManagerRetriever.java:73)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:95)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.bumptech.glide.Glide.with(Glide.java:657)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.dylanvann.fastimage.FastImageViewManager.setSrc(FastImageViewManager.java:153)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	... 23 more
04-10 13:55:13.679   628   628 E AndroidRuntime: Caused by: java.lang.InstantiationException: java.lang.Class<com.dylanvann.fastimage.OkHttpProgressGlideModule> has no zero argument constructor
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at java.lang.Class.newInstance(Native Method)
04-10 13:55:13.679   628   628 E AndroidRuntime: 	at com.bumptech.glide.module.ManifestParser.parseModule(ManifestParser.java:51)

Maybe Related:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

24reactions
oneromancommented, Nov 29, 2018

I have added the following lines in my app and seems the issue is gone:

-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
  **[] $VALUES;
  public *;
}

I am not sure may be the docs shall be updated here.

1reaction
cgaofcommented, Nov 29, 2018

I to add below lines to /android/app/proguard-rules.pro file (based on #110) and It’s not working for me:

-keep public class com.dylanvann.fastimage.* {;} -keep public class com.dylanvann.fastimage.** {;}

Read more comments on GitHub >

github_iconTop Results From Across the Web

App crashes when select Release mode but in debug mode ...
I want to reduce size of my application therefore I am using minifyEnabled true in release mode but due to this application crashes....
Read more >
Android App suddenly crashes when compiling in Release ...
Hi. My App was working fine when build to release mode, and both when downloading from Google play store or from a Android...
Read more >
app crashes at launch as release b… | Apple Developer Forums
When you install the app to the device on debug mode or release mode through Xcode, it's normal and will not encounter this...
Read more >
App crashes in release mode #954 - GitHub
I'm trying to assemble the release apk. ... App crashes in release mode #954. Open. 3 of 4 tasks ... This works perfectly...
Read more >
Android App Crashes in release mode. What are the required ...
Android App Crashes in release mode. What are the required class that needs to be added in proGurad. In Debug mode everything works...
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