stefansaenger opened a new issue, #1530:
URL: https://github.com/apache/cordova-android/issues/1530

   # Bug Report
   
   ## Problem
   
   We have been using input with type=file for a long time to select files - 
with handling the onChange event in our angular application. Suddenly this 
stopped working - while the js code running inside the cordova app is unchanged.
   
   Instead - no event is fired inside the js application - but there are some 
errors in native android logs. After checking with a few devices it still seems 
to work with an older pixel XL running android 10 and android system webview 
107.
   
   On several other devices (Pixel 6 with Android 13 and latest webview 108, 
Pixel 4a with Android 13 and webview 108, Pixel 3a with Android 12 and webview 
108, Oppo Find X2 Lite with Android 12 and webview 108, OnePlus Nord with 
Android 12 and webview 108) it is no longer working - with the app build that 
worked last week...
   
   ### What is expected to happen?
   
   input callback is fired, providing file information for further usage inside 
the application.
   
   ### What does actually happen?
   
   From a user perspective - nothing. However, I found some log messages using 
adb that seem to be related:
   
   `12-19 14:30:22.314 13313 13313 D CompatibilityChangeReporter: Compat change 
id reported: 171228096; UID 10066; state: ENABLED 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage: Failed to resume:  
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage: 
java.io.FileNotFoundException: name 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.base.DocumentInfo.asFileNotFoundException(DocumentInfo.java:427)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.base.DocumentInfo.updateFromUri(DocumentInfo.java:221) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.base.DocumentInfo.updateSelf(DocumentInfo.java:205) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.base.DocumentStack.updateDocuments(DocumentStack.java:240)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.base.DocumentStack.fromLastAccessedCursor(DocumentStack.java:255)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.picker.LastAccessedStorage$RuntimeLastAccessedStorage.getLastAccessed(LastAccessedStorage.java:66)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.picker.ActionHandler.initLoadLastAccessedStack(ActionHandler.java:176)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.picker.ActionHandler.initLocation(ActionHandler.java:135)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.picker.PickActivity.onCreate(PickActivity.java:162) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.app.Activity.performCreate(Activity.java:8054) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.app.Activity.performCreate(Activity.java:8034) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3688) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.os.Handler.dispatchMessage(Handler.java:106) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.os.Looper.loopOnce(Looper.java:201) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.os.Looper.loop(Looper.java:288) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.app.ActivityThread.main(ActivityThread.java:7870) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
java.lang.reflect.Method.invoke(Native Method) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage: Caused by: 
java.lang.NullPointerException: name 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
java.util.Objects.requireNonNull(Objects.java:245) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
android.content.ContentResolver.acquireUnstableContentProviderClient(ContentResolver.java:2629)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.DocumentsApplication.acquireUnstableProviderOrThrow(DocumentsApplication.java:85)
 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        at 
com.android.documentsui.base.DocumentInfo.updateFromUri(DocumentInfo.java:213) 
   12-19 14:30:22.399 13313 13313 W LastAccessedStorage:        ... 23 more 
   12-19 14:30:22.400 13313 13313 E oid.documentsu: No package ID ff found for 
ID 0xffffffff. 
   12-19 14:30:22.419 13313 13313 W SelectionTracker: Setting gestureTooltypes 
is likely to result in unexpected behavior. 
   12-19 14:30:22.425 13313 13349 W RefreshTask: Failed to refresh 
   12-19 14:30:22.425 13313 13349 W RefreshTask: 
java.lang.NullPointerException: name 
   12-19 14:30:22.425 13313 13349 W RefreshTask:        at 
java.util.Objects.requireNonNull(Objects.java:245) 
   12-19 14:30:22.425 13313 13349 W RefreshTask:        at 
android.content.ContentResolver.acquireUnstableContentProviderClient(ContentResolver.java:2629)
 
   12-19 14:30:22.425 13313 13349 W RefreshTask:        at 
com.android.documentsui.DocumentsApplication.acquireUnstableProviderOrThrow(DocumentsApplication.java:85)
 
   12-19 14:30:22.425 13313 13349 W RefreshTask:        at 
com.android.documentsui.RefreshTask.run(RefreshTask.java:108) 
   12-19 14:30:22.425 13313 13349 W RefreshTask:        at 
com.android.documentsui.RefreshTask.run(RefreshTask.java:43) 
   12-19 14:30:22.425 13313 13349 W RefreshTask:        at 
com.android.documentsui.base.CheckedTask.doInBackground(CheckedTask.java:65) 
   12-19 14:30:22.425 13313 13349 W RefreshTask:        at 
android.os.AsyncTask$3.call(AsyncTask.java:394) 
   12-19 14:30:22.425 13313 13349 W RefreshTask:        at 
java.util.concurrent.FutureTask.run(FutureTask.java:264) 
   12-19 14:30:22.425 13313 13349 W RefreshTask:        at 
com.android.documentsui.ProviderExecutor.run(ProviderExecutor.java:104)`
   
   
   ## Information
   
   for the error message in logs -see above.
   permissions seem to be correct:
   android.permission.READ_EXTERNAL_STORAGE and 
android.permission.WRITE_EXTERNAL_STORAGE are both granted
   
   
   ### Command or Code
   
   Code inside the angualr application:
   
   `<input id="attachFile" title=" " (change)="attachFile($event)" 
multiple="true" accept="*" type="file"/>`
   
   It still opens the file picker dialog, but after selecting a file nothing 
happens. Only the mentioned java errors appear when checking with adb.
   
   
   ### Environment, Platform, Device
   
   Tested and confirmed with these devices:
   Pixel 6 with Android 13 and latest webview 108
   Pixel 4a with Android 13 and webview 108
   Pixel 3a with Android 12 and webview 108
   Oppo Find X2 Lite with Android 12 and webview 108
   OnePlus Nord with Android 12 and webview 108
   
   
   
   ### Version information
   
   ```
   cordova 11.0.0
   cordova-android 11.0.0
   javac 11.0.17
   
   ```
   
   
   ## Checklist
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to