chat21 / chat21-android-demo

Android chat demo app with Chat21 SDK for Firebase
http://www.chat21.org
MIT License
62 stars 58 forks source link

The crash app during the photo submission process changes the screen rotation to landscape mode #12

Open rezamusic881 opened 6 years ago

rezamusic881 commented 6 years ago

Project Information


Expected behavior

Supposedly, The application does not crash, when the process of sending photos in landscape mode.

Actual behavior

The application crashes, when the process of sending photos in landscape mode.

How to reproduce

  1. Instal App here
  2. Run the app.
  3. Sign in on chat feature Screenshot_2018-05-25-01-16-11-854_com.whatsapp.png
  4. Select the contact you want to send the image to. Screenshot_2018-05-25-01-16-18-736_com.whatsapp.png
  5. Click and hold in the right corner. Screenshot_2018-05-25-01-16-23-289_com.whatsapp.png
  6. Click on "image writing" to access the gallery. Screenshot_2018-05-25-01-16-27-672_com.whatsapp.png
  7. Select the picture you want to send. Screenshot_2018-05-25-01-16-31-095_com.whatsapp.png
  8. Click on "Ok" to approve the image submission. Screenshot_2018-05-25-01-16-33-917_com.whatsapp.png
  9. After approving the image submission.protect screen rotation changes to landscape mode, the application will crash. Screenshot_2018-05-25-01-11-25-326_chat21.android.demo.png


Environment



Recording Of The Issues

https://youtu.be/9ZiJaDSRiC4


Logcat

05-25 01:39:17.207 14985 14985 E AndroidRuntime: FATAL EXCEPTION: main
05-25 01:39:17.207 14985 14985 E AndroidRuntime: Process: chat21.android.demo, PID: 14985
05-25 01:39:17.207 14985 14985 E AndroidRuntime: java.lang.IllegalArgumentException: View=DecorView@26c0a11[] not attached to window manager
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:479)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:388)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:126)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at android.app.Dialog.dismissDialog(Dialog.java:373)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at android.app.Dialog.dismiss(Dialog.java:356)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at org.chat21.android.ui.messages.activities.MessageListActivity$10.onUploadSuccess(MessageListActivity.java:712)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at org.chat21.android.storage.StorageHandler$2.onSuccess(StorageHandler.java:130)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at org.chat21.android.storage.StorageHandler$2.onSuccess(StorageHandler.java:122)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at com.google.firebase.storage.zzj.zzi(Unknown Source)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at com.google.firebase.storage.zzaa.run(Unknown Source)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:754)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:95)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:163)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6361)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
05-25 01:39:17.207 14985 14985 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)

Proof Of Work Done

Submit in github
stefanodp91 commented 6 years ago

Hi rezamusic881, Thank you very much for finding this bug. Let we think about how best to solve this, we'll release the fin on the next Chat21 SDK release

rezamusic881 commented 6 years ago

The action of good change, hopefully this application will be more advanced.