WindowLeaked com.android.internal.policy.PhoneWindow
See original GitHub issue03-28 16:21:04.862 27263-27263/com.test.debug E/WindowManager: android.view.WindowLeaked: Activity com.test.MainActivity has leaked window com.android.internal.policy.PhoneWindow$DecorView{6b8b757 V.E...... R....... 0,0-1026,749} that was originally added here
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:566)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:326)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at android.app.Dialog.show(Dialog.java:350)
at com.imagepicker.ImagePickerModule.showImagePicker(ImagePickerModule.java:182)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:345)
at com.facebook.react.cxxbridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:136)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:158)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
at java.lang.Thread.run(Thread.java:818)
react-native: 0.42.0 react-native-image-picker: 0.26.2 platform: Android
Hi, it was working fine when react-native was 0.38, but after the upgrade pressing Take a Photo
will crash the app on Android and throw the error above. Thanks in advanced!
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (4 by maintainers)
Top Results From Across the Web
android activity has leaked window com.android.internal ...
WindowLeaked : Activity exp.app.NetErrorPage has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40534a18 that was ...
Read more >MainActivity has leaked window com.android.internal ... - GitHub
Hello. When I start my app compiled in release mode I've got this error : Activity com.myapp.MainActivity has leaked window ...
Read more >Activity has leaked window - Mobikul
WindowLeaked : Activity com.example.android has leaked window. com.android.internal.policy.PhoneWindow$DecorView{c75fa80 V.E…
Read more >Activity has leaked window that was originally added - Wikitechy
WindowLeaked : Activity ccom.mypkg.myP has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44c46ff0 that was originally added here 05-17 ...
Read more >app.MainActivity has leaked window com.android.internal.policy
How to solve :Activity com.app.moko.MainActivity has leaked window com.android. internal. policy.impl. PhoneWindow --------that error appear ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After an about 3 hours of sweating, I added these 2 lines in AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
and worked like a charm
I was able to fix the issue. Had to change my provider to look like this… (copied directly from android manifest in
react-native-image-picker
)