Android: Fc app on selecting storage folder auto uploaded

Created on 13 Jan 2020  路  3Comments  路  Source: nextcloud/android

Steps to reproduce

  1. Clicking on auto upload
  2. Selecting folder
  3. Select Configure
  4. Trying to change the Remote folder,
    nextcloud crashes afterwards

Expected behaviour

  • nextcloud remote structure should show up to change the remote folder.

Actual behaviour

  • App instantly force closes.

Environment data

Android version: 10, Miui11

Device model: Xiaomi mi 9

Stock or customized system: MiuiMix 11.2

Nextcloud app version: 3.10.0 RC2

Nextcloud server version: 17.0.2

Logs

Web server error log

Insert your webserver log here

*** CAUSE OF ERROR ***

java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.MenuItem.setVisible(boolean)' on a null object reference
at com.owncloud.android.ui.fragment.OCFileListFragment.onPrepareOptionsMenu(OCFileListFragment.java:796)
at androidx.fragment.app.Fragment.performPrepareOptionsMenu(Fragment.java:2723)
at androidx.fragment.app.FragmentManagerImpl.dispatchPrepareOptionsMenu(FragmentManagerImpl.java:2743)
at androidx.fragment.app.FragmentController.dispatchPrepareOptionsMenu(FragmentController.java:398)
at androidx.fragment.app.FragmentActivity.onPreparePanel(FragmentActivity.java:489)
at androidx.appcompat.view.WindowCallbackWrapper.onPreparePanel(WindowCallbackWrapper.java:99)
at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onPreparePanel(AppCompatDelegateImpl.java:2857)
at androidx.appcompat.view.WindowCallbackWrapper.onPreparePanel(WindowCallbackWrapper.java:99)
at androidx.appcompat.app.ToolbarActionBar$ToolbarCallbackWrapper.onPreparePanel(ToolbarActionBar.java:522)
at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:456)
at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:56)
at android.os.Handler.handleCallback(Unknown Source:2)
at android.os.Handler.dispatchMessage(Unknown Source:4)
at android.os.Looper.loop(Unknown Source:242)
at android.app.ActivityThread.main(Unknown Source:98)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
at com.android.internal.os.ZygoteInit.main(Unknown Source:275)

*** APP INFORMATION ***
ID: com.nextcloud.client
Version: 30100052
Build flavor: gplay

*** DEVICE INFORMATION ***
Brand: Xiaomi
Device: cepheus
Model: MI 9
Id: QKQ1.190825.002
Product: cepheus

*** FIRMWARE ***
SDK: 29
Release: 10
Incremental: 20.1.9

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

approved bug high pr exists

Most helpful comment

this is my first report ever on github, please be gentle to me ;)

All 3 comments

this is my first report ever on github, please be gentle to me ;)

Hi @toobie83 thank you very much for your report! 馃檹 This is highly appreciated! 鉂わ笍

@tobiasKaminsky ping

https://github.com/nextcloud/android/blob/master/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java#L796

// create rich workspace
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            menu.findItem(R.id.action_create_rich_workspace).setVisible(TextUtils.isEmpty(mFile.getRichWorkspace()));
        }

in some cases the item seems to be missing, so this needs to be fixed for 3.10

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markbryanduncan picture markbryanduncan  路  3Comments

ikke-t picture ikke-t  路  3Comments

Tie-fighter picture Tie-fighter  路  3Comments

tobiasKaminsky picture tobiasKaminsky  路  3Comments

Shagequi picture Shagequi  路  3Comments