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

[kiwix-3.11.0] Zim files are not opening with kiwix when clicking from the storage. #3884

Closed
triffid opened this issue Jun 18, 2024 · 4 comments · Fixed by #3887
Closed

[kiwix-3.11.0] Zim files are not opening with kiwix when clicking from the storage. #3884

triffid opened this issue Jun 18, 2024 · 4 comments · Fixed by #3887
Assignees
Milestone

Comments

@triffid
Copy link

triffid commented Jun 18, 2024

I've manually told my file explorer to open them with kiwix, but the kiwix app just throws a toast that says:

Failed to open file
Please try looking for this file in the Device Tab of your Library

I don't see any "device tab" in Library.

I ran logcat while opening the file, and grepping for kiwix only brings up:

06-18 20:11:33.995 29847 29857 W ngs.android.pop: ApkAssets: Deleting an ApkAssets object '<empty> and /data/app/~~dVCls40xDUVGt940DOn5YQ==/org.kiwix.kiwixmobile-eE95OZTeiPuitMRQczluLA==/base.apk' with 1 weak references
06-18 20:11:33.995 29847 29857 W ngs.android.pop: ApkAssets: Deleting an ApkAssets object '<empty> and /data/app/~~dVCls40xDUVGt940DOn5YQ==/org.kiwix.kiwixmobile-eE95OZTeiPuitMRQczluLA==/split_config.arm64_v8a.apk' with 1 weak references
06-18 20:11:33.995 29847 29857 W ngs.android.pop: ApkAssets: Deleting an ApkAssets object '<empty> and /data/app/~~dVCls40xDUVGt940DOn5YQ==/org.kiwix.kiwixmobile-eE95OZTeiPuitMRQczluLA==/split_config.xxhdpi.apk' with 1 weak references
06-18 20:11:51.318  2544  5179 V SplashScreenExceptionList: SplashScreen checking exception for package org.kiwix.kiwixmobile (target sdk:33) -> false
06-18 20:11:51.319  2544  5179 I ActivityTaskManager: START u0 {act=android.intent.action.VIEW dat=content://com.estrongs.files/... typ=*/* flg=0x10000000 cmp=org.kiwix.kiwixmobile/.main.KiwixMainActivity} with LAUNCH_SINGLE_TOP from uid 10235 (BAL_ALLOW_VISIBLE_WINDOW) result code=0
06-18 20:11:51.319  3455  3500 V WindowManagerShell: Transition requested (#967): android.os.BinderProxy@cb43ae8 TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=379 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.VIEW dat=content://com.estrongs.files/... typ=*/* flg=0x10000000 cmp=org.kiwix.kiwixmobile/.main.KiwixMainActivity } baseActivity=ComponentInfo{org.kiwix.kiwixmobile/org.kiwix.kiwixmobile.main.KiwixMainActivity} topActivity=ComponentInfo{org.kiwix.kiwixmobile/org.kiwix.kiwixmobile.main.KiwixMainActivity} origActivity=null realActivity=ComponentInfo{org.kiwix.kiwixmobile/org.kiwix.kiwixmobile.main.KiwixMainActivity} numActivities=1 lastActiveTime=216174697 supportsMultiWindow=true resizeMode=2 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@a1ff501} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 112 - 0, 0) topActivityInfo=ActivityInfo{c07cfa6 org.kiwix.kiwixmobile.main.KiwixMainActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=false isVisible=false isVisibleRequested=false isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=false appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false isLetterboxDoubleTapEnabled= false topActivityEligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 isUserFullscreenOverrideEnabled=false cameraCompatControlState=hidden}}, pipTask = null, remoteTransition = null, displayChange = null, flags = 0, debugId = 967 }
06-18 20:11:51.326  2544  2747 D ActivityManager: sync unfroze 18018 org.kiwix.kiwixmobile for 1
06-18 20:11:51.331  2544  9935 D CoreBackPreview: Window{cc979c5 u0 Splash Screen org.kiwix.kiwixmobile}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@c14ec28, mPriority=0, mIsAnimationCallback=false}
06-18 20:11:51.353  2544  2744 V WindowManager: Sent Transition (#967) createdAt=06-18 20:11:51.315 via request=TransitionRequestInfo { type = OPEN, triggerTask = TaskInfo{userId=0 taskId=379 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.VIEW dat=content://com.estrongs.files/... typ=*/* flg=0x10000000 cmp=org.kiwix.kiwixmobile/.main.KiwixMainActivity } baseActivity=ComponentInfo{org.kiwix.kiwixmobile/org.kiwix.kiwixmobile.main.KiwixMainActivity} topActivity=ComponentInfo{org.kiwix.kiwixmobile/org.kiwix.kiwixmobile.main.KiwixMainActivity} origActivity=null realActivity=ComponentInfo{org.kiwix.kiwixmobile/org.kiwix.kiwixmobile.main.KiwixMainActivity} numActivities=1 lastActiveTime=216174697 supportsMultiWindow=true resizeMode=2 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{RemoteToken{ec48027 Task{771000e #379 type=standard A=10255:org.kiwix.kiwixmobile}}} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=-1 lastParentTaskIdBeforePip=-1 displayCutoutSafeInsets=Rect(0, 112 - 0, 0) topActivityInfo=ActivityInfo{de0a2d4 org.kiwix.kiwixmobile.main.KiwixMainActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=false isVisible=false isVisibleRequested=false isSleeping=false locusId=null displayAreaFeatureId=1 isTopActivityTransparent=false appCompatTaskInfo=AppCompatTaskInfo { topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false isLetterboxDoubleTapEnabled= false topActivityEligibleForUserAspectRatioButton= false topActivityBoundsLetterboxed= false isFromLetterboxDoubleTap= false topActivityLetterboxVerticalPosition= -1 topActivityLetterboxHorizontalPosition= -1 topActivityLetterboxWidth=-1 topActivityLetterboxHeight=-1 isUserFullscreenOverrideEnabled=false cameraCompatControlState=hidden}}, pipTask = null, remoteTransition = null, displayChange = null, flags = 0, debugId = 967 }
06-18 20:11:51.354  2544  2744 V WindowManager:         {WCT{RemoteToken{ec48027 Task{771000e #379 type=standard A=10255:org.kiwix.kiwixmobile}}} m=OPEN f=NONE leash=Surface(name=Task=379)/@0x3cced41 sb=Rect(0, 0 - 1080, 2400) eb=Rect(0, 0 - 1080, 2400) d=0},
06-18 20:11:51.400  2544  5179 D ConnectivityService: requestNetwork for uid/pid:10255/18018 activeRequest: null callbackRequest: 2139 [NetworkRequest [ REQUEST id=2140, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10255 RequestorUid: 10255 RequestorPkg: org.kiwix.kiwixmobile UnderlyingNetworks: Null] ]] callback flags: 0 order: 2147483647
06-18 20:11:51.401  2544  3366 D UntrustedWifiNetworkFactory: got request NetworkRequest [ REQUEST id=2140, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10255 RequestorUid: 10255 RequestorPkg: org.kiwix.kiwixmobile UnderlyingNetworks: Null] ]
06-18 20:11:51.401  2544  3366 D OemPaidWifiNetworkFactory: got request NetworkRequest [ REQUEST id=2140, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10255 RequestorUid: 10255 RequestorPkg: org.kiwix.kiwixmobile UnderlyingNetworks: Null] ]
06-18 20:11:51.401  2544  3366 D MultiInternetWifiNetworkFactory: got request NetworkRequest [ REQUEST id=2140, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10255 RequestorUid: 10255 RequestorPkg: org.kiwix.kiwixmobile UnderlyingNetworks: Null] ]
06-18 20:11:51.409  5273  5273 D PhoneSwitcherNetworkRequstListener: got request NetworkRequest [ REQUEST id=2140, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VCN_MANAGED Uid: 10255 RequestorUid: 10255 RequestorPkg: org.kiwix.kiwixmobile UnderlyingNetworks: Null] ]
06-18 20:11:51.427  2544  2784 I ActivityManager: Start proc 30403:com.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:4/u0i38 for  {org.kiwix.kiwixmobile/org.chromium.content.app.SandboxedProcessService0:4}
06-18 20:11:51.431  2544  5179 D CoreBackPreview: Window{ff01eed u0 org.kiwix.kiwixmobile/org.kiwix.kiwixmobile.main.KiwixMainActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@c391170, mPriority=0, mIsAnimationCallback=false}
06-18 20:11:51.462  2544  2744 I ActivityTaskManager: Displayed org.kiwix.kiwixmobile/.main.KiwixMainActivity for user 0: +145ms
06-18 20:11:51.484  2544  5179 I ImeTracker: org.kiwix.kiwixmobile:df1aafc: onRequestHide at ORIGIN_SERVER_HIDE_INPUT reason HIDE_UNSPECIFIED_WINDOW
06-18 20:11:51.484  2544  5179 I ImeTracker: org.kiwix.kiwixmobile:df1aafc: onCancelled at PHASE_SERVER_SHOULD_HIDE
06-18 20:11:51.735  3455  3510 D VRI[kiwixmobile]: Not drawing due to not visible
06-18 20:11:51.736  2544  5270 D CoreBackPreview: Window{cc979c5 u0 Splash Screen org.kiwix.kiwixmobile EXITING}: Setting back callback null
06-18 20:11:51.736  2544  5179 W InputManager-JNI: Input channel object 'cc979c5 Splash Screen org.kiwix.kiwixmobile (client)' was disposed without first being removed with the input manager!

which doesn't look like it has anything particularly relevant inside.

My device is running LineageOS-21 / Android 14.

Some apps (camera, video player, music player) have "files" or "all files" permissions so they can access shared files, but kiwix doesn't seem to even request this.

My ebook reader apparently doesn't have any permissions and can still open ebooks passed from my file browser.

Apparently this is uniquely a kiwix problem.

Let me know if you want me to perform any further debugging steps

@kelson42
Copy link
Collaborator

@triffid Thank you for your quality issue. Please give us a few days to come back to you.

@MohitMaliFtechiz
Copy link
Collaborator

Some apps (camera, video player, music player) have "files" or "all files" permissions so they can access shared files, but kiwix doesn't seem to even request this.

@triffid Thanks for opening the issue, which version you are using of the application (playStore version or website version)?

For the playStore version

In this version, we have limited access to storage files as for now until we fix the #3628.

My ebook reader apparently doesn't have any permissions and can still open ebooks passed from my file browser.

Yes, that uses the "storage access framework(SAF)" to read the files from your storage, and to properly support the SAF in kiwix we already have a ticket #3628.

For now to read the zim file you can put your zim file inside the app-specific(Android/data/org.kiwix.kiwixmobile/files) directory so that Kiwix can read that zim file(after putting the file there it will be show in the Library screen).

For the website/debug version

If you are not using the playStore version and it's still showing this error message then the application does not have the "all files" permission(as you are saying you are not seeing that permission) please give the "all files" permission from the application setting. Since "all files" permission does not directly show inside the application setting on the newer version of Android.

screen-20240620-120138.mp4

Failed to open file
Please try looking for this file in the Device Tab of your Library
I don't see any "device tab" in Library.

This error message is outdated now(it was for the older UI), now it should be

Failed to open file
Please try looking for this file in your Library

@triffid
Copy link
Author

triffid commented Jun 20, 2024

Yeah this bug is against the play store version.

I guess I'll keep an eye on #3628 and use the website apk until it's sorted and pushed.

PS: howcome your github CI doesn't offer APKs? I tried finding an apk there, but it looks like it generates, pushes, then drops everything with an error message about trying to export a directory instead of a file as a build product

@MohitMaliFtechiz
Copy link
Collaborator

MohitMaliFtechiz commented Jun 20, 2024

@triffid You can download the latest released APK( kiwix-3.11.0.apk) from here https://download.kiwix.org/release/kiwix-android/.

Nightly CI generates the APK daily, and uploads it at https://download.kiwix.org/nightly/.

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

Successfully merging a pull request may close this issue.

3 participants