Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Avoid selection of multiple images on upload from device #519

Closed
mzorz opened this issue Jan 29, 2019 · 1 comment
Closed

[Android] Avoid selection of multiple images on upload from device #519

mzorz opened this issue Jan 29, 2019 · 1 comment
Assignees
Labels
Media [OS] Android [Type] Bug Something isn't working
Milestone

Comments

@mzorz
Copy link
Contributor

mzorz commented Jan 29, 2019

Inserting multiple images makes the app break for an IMAGE block.

We should force the selection to be only 1 image for now

  1. start a new draft
  2. insert an image block
  3. select "upload from device"
  4. when the screen shows pictures to choose from, tap and hold to select more than 1
  5. tap OPEN
  6. the app crashes
2019-01-29 18:49:16.340 22239-22239/org.wordpress.android E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.wordpress.android, PID: 22239
    java.lang.RuntimeException: Illegal callback invocation from native module. This callback type only permits a single invocation from native code.
        at com.facebook.react.bridge.CallbackImpl.invoke(CallbackImpl.java:28)
        at org.wordpress.mobile.ReactNativeGutenbergBridge.RNReactNativeGutenbergBridgeModule$2.onUploadMediaFileSelected(RNReactNativeGutenbergBridgeModule.java:105)
        at org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.appendUploadMediaFile(WPAndroidGlueCode.java:329)
        at org.wordpress.android.editor.GutenbergEditorFragment.appendMediaFile(GutenbergEditorFragment.java:418)
        at org.wordpress.android.ui.posts.EditPostActivity.addMediaVisualEditor(EditPostActivity.java:2712)
        at org.wordpress.android.ui.posts.EditPostActivity.access$4800(EditPostActivity.java:192)
        at org.wordpress.android.ui.posts.EditPostActivity$AddMediaListThread$3.run(EditPostActivity.java:2699)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
2019-01-29 18:49:16.347 1105-2523/? W/ActivityManager:   Force finishing activity org.wordpress.android/.ui.posts.EditPostActivity
@mzorz
Copy link
Contributor Author

mzorz commented Jan 30, 2019

Closing via wordpress-mobile/WordPress-Android#9150

@mzorz mzorz closed this as completed Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media [OS] Android [Type] Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant