nextcloud / news-android

📱🗞️ Android client for the Nextcloud news/feed reader app
https://play.google.com/store/apps/details?id=de.luhmer.owncloudnewsreader
GNU Affero General Public License v3.0
693 stars 257 forks source link

App crashes when opening links / Custom Chrome Tab / External browser #1442

Open klada opened 3 months ago

klada commented 3 months ago

I have set up Nextcloud News and syncing and reading articles within the app is working.

However when clicking a link from an article or when opening an article in the browser / Chrome custom tab the app crashes.

This is what the log says:

21 19:51:23.230  1474  2708 W PackageConfigPersister: App-specific configuration not found for packageName: de.luhmer.owncloudnewsreader and userId: 0
06-21 19:51:23.239   602  5850 E vold    : Failed to set project id on /data/media/0/Android/data/de.luhmer.owncloudnewsreader/: Operation not supported on transport endpoint
06-21 19:51:23.240 19407 19407 W ContextImpl: Failed to ensure /storage/emulated/0/Android/data/de.luhmer.owncloudnewsreader/cache: android.os.ServiceSpecificException:  (code -1)
06-21 19:51:23.244 19407 19407 D AndroidRuntime: Shutting down VM
06-21 19:51:23.245 19407 19407 E AndroidRuntime: FATAL EXCEPTION: main
06-21 19:51:23.245 19407 19407 E AndroidRuntime: Process: de.luhmer.owncloudnewsreader, PID: 19407
06-21 19:51:23.245 19407 19407 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at de.luhmer.owncloudnewsreader.helper.m.g(SourceFile:5)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at de.luhmer.owncloudnewsreader.helper.m.j(SourceFile:3)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at de.luhmer.owncloudnewsreader.services.DownloadWebPageService.h(SourceFile:3)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at de.luhmer.owncloudnewsreader.l.a2(SourceFile:19)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at de.luhmer.owncloudnewsreader.l$a.shouldOverrideUrlLoading(SourceFile:3)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at android.webkit.WebViewClient.shouldOverrideUrlLoading(WebViewClient.java:83)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(chromium-TrichromeWebViewGoogle6432.aab-stable-647807133:126)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at android.os.MessageQueue.nativePollOnce(Native Method)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at android.os.MessageQueue.next(MessageQueue.java:344)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:189)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:317)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:8501)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
06-21 19:51:23.245 19407 19407 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

I have tried the following:

Nextcloud News is the only app which is having issues like that.

Nextcloud News 0.9.9.90 (F-Droid) on Android 14


App Version: 0.9.9.90 App Version Code: 191


SSO enabled: true


OS Version: 4.14.340-openela(794b5d6c29) OS API Level: 34 Device: surya Model (and Product): M2007J20CG (surya)


sp_max_cache_size=500 sp_swipe_left_action=2 sw_use_single_sign_on=true cb_ShowOnlyUnread=false cb_openInBrowserDirectly=false cb_prefBackButtonOpensDrawer=false lv_cacheImagesOffline=0 cb_ShowFastActions=true pref_sync_settings=0 cb_AutoSyncOnStart=false sp_news_detail_actionbar_icons=[] sp_swipe_right_action=1 cb_NavigateWithVolumeButtons=false sp_font_size=1.0 NewsWebVersionNumber=24.0.0 sp_search_in=2 cb_external_player=false sp_sort_order=1 cb_MarkAsReadWhileScrolling=false sp_feed_list_layout=6 cb_oled_mode=false PREVIOUS_VERSION_CODE=191 sp_display_browser=0 sp_app_theme=0

svenschn commented 3 months ago

Unfortunately, I have the same problem. I'm on the latest version offered by Google Play Store (Version 0.9.9.85).

svenschn commented 3 months ago

I have already tried to reinstall the app, but no change

svenschn commented 3 months ago

Unfortunately, this now happens very often (currently I have to kill the app every few articles). Deleting the app data in the system settings as well as in the app settings did not help either.

David-Development commented 3 months ago

Thank you for the report. Any chance you guys are using either the "Download articles offline" or the "Cache images offline" feature (from the config you provided it looks like it's off)? I think the code that's causing the crash should only be used by either one of there functions. Unfortunately my time is extremely limited right now due to some personal things but starting at the end of next month I'll have more time again to work on this app

svenschn commented 3 months ago

@David-Development I'm not using image offline cache but I'm not sure which option you refer to by download articles offline. I have attached a screenshot of my settings, though.

Screenshot_20240703-180121

David-Development commented 3 months ago

@svenschn The "Download articles offline" feature is not an option in the settings - it's one of the "options" that appear when you launch the app and tap on the menu (three dots) in the top right corner. But I guess you are not using it then 😅

svenschn commented 3 months ago

@David-Development Oh, I see... 😅 Indeed I'm not using this.

klada commented 3 months ago

Same for me. I am not using any of these options.

Edit: Another interesting observation:

Opening the browser from the article list (long-press → open in browser) is working. And enabling the setting "Skip detail view and open article in browser" is also working.

So it depends on the click path in the app if it crashes or not.

Working:

Not working: