AmazeFileManager icon indicating copy to clipboard operation
AmazeFileManager copied to clipboard

Add support for WSA (Windows Subsystem for Android)

Open richardhttps opened this issue 4 years ago • 5 comments

Issue explanation (write below this line)

I installed Amaze on WSA (Windows Subsystem for Android) and the app crashed on launch, showing me the error report below.

Exception

  • App Name: Amaze File Manager
  • Package: com.amaze.filemanager
  • Version: 3.6.5
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 11 - 30
  • Device: redfin
  • Model: Pixel 5
  • Product: redfin
Crash log

java.lang.RuntimeException: Unable to resume activity {com.amaze.filemanager/com.amaze.filemanager.ui.activities.MainActivity}: java.lang.NullPointerException: null cannot be cast to non-null type android.hardware.usb.UsbManager
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4438)
	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4470)
	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7664)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.NullPointerException: null cannot be cast to non-null type android.hardware.usb.UsbManager
	at com.amaze.filemanager.utils.OTGUtil.getMassStorageDevicesConnected(OTGUtil.kt:198)
	at com.amaze.filemanager.ui.activities.MainActivity.updateUsbInformation(MainActivity.java:1290)
	at com.amaze.filemanager.ui.activities.MainActivity.onResume(MainActivity.java:1282)
	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)
	at android.app.Activity.performResume(Activity.java:8129)
	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4428)
	... 11 more


richardhttps avatar Oct 30 '21 11:10 richardhttps

Place crashes relating to WSA in an issue, then reference it here.

EmmanuelMess avatar Oct 30 '21 12:10 EmmanuelMess

@richardnassour Can you please test an APK for us? app-play-debug.zip

Please report if you keep finding this bug and if you find any others please create issues for them, thanks!

EmmanuelMess avatar Oct 30 '21 12:10 EmmanuelMess

@richardnassour Can you please test an APK for us? app-play-debug.zip

Please report if you keep finding this bug and if you find any others please create issues for them, thanks!

It opened this time, but crashed again when I responded to the "Grant SAF access" prompt. I recorded it on video. https://user-images.githubusercontent.com/33163707/139574857-70d81701-5351-40f1-81c2-dc7bde1a96c9.mp4 Error report: https://pastebin.com/yH7uNhYC

richardhttps avatar Oct 31 '21 08:10 richardhttps

Reopening this in response to adding support for this. Temporary bypassing the crash should be tracked with #2955

VishalNehra avatar Oct 31 '21 09:10 VishalNehra

@richardnassour Can you please test an APK for us? app-play-debug.zip Please report if you keep finding this bug and if you find any others please create issues for them, thanks!

It opened this time, but crashed again when I responded to the "Grant SAF access" prompt. I recorded it on video. user-images.githubusercontent.com/33163707/139574857-70d81701-5351-40f1-81c2-dc7bde1a96c9.mp4 Error report: pastebin.com/yH7uNhYC

That error is already being tracked #2876 and has a fixing PR.

I will however create a new issue for fixing the fact that there are no storages in WSA.

EmmanuelMess avatar Oct 31 '21 11:10 EmmanuelMess