Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

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

Closed

Description

@mzorz

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

Activity

  1. added this to the Beta milestone on Jan 29, 2019
  2. self-assigned this
    on Jan 29, 2019
  3. mzorz commented on Jan 30, 2019

    @mzorz
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions