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

App crashes on file upload #34

Closed
AviFix opened this issue May 11, 2017 · 3 comments
Closed

App crashes on file upload #34

AviFix opened this issue May 11, 2017 · 3 comments

Comments

@AviFix
Copy link

AviFix commented May 11, 2017

Hi,

If i tray to select a file via html file input then the app crashes with the following error:

05-11 15:41:48.184 11403-11436/org.chromium.chrome.browser E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3 Process: org.chromium.chrome.browser, PID: 11403 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:325) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference at android.support.v4.content.FileProvider.parsePathStrategy(FileProvider.java:561) at android.support.v4.content.FileProvider.getPathStrategy(FileProvider.java:535) at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:377) at org.chromium.chrome.browser.FileProviderHelper.getContentUriFromFile(FileProviderHelper.java:24) at org.chromium.base.ContentUriUtils.getContentUriFromFile(ContentUriUtils.java:54) at org.chromium.ui.UiUtils.getUriForImageCaptureFile(UiUtils.java:332) at org.chromium.ui.base.SelectFileDialog$GetCameraIntentTask.doInBackground(SelectFileDialog.java:218) at org.chromium.ui.base.SelectFileDialog$GetCameraIntentTask.doInBackground(SelectFileDialog.java:213) at android.os.AsyncTask$2.call(AsyncTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)  at java.lang.Thread.run(Thread.java:761) 

Thanks
Avi

@AviFix
Copy link
Author

AviFix commented May 16, 2017

Anyone?

@AviFix
Copy link
Author

AviFix commented May 18, 2017

Hi,

In this file:
org.chromium.chrome.browser.FileProviderHelper

On line 25:

Changing "context.getPackageName()" to "org.chromium.chrome" . seems to solve the problem

Avi

JackyAndroid added a commit that referenced this issue Jun 1, 2017
@JackyAndroid
Copy link
Owner

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants