OneDrive looping with error

  • Since not too long, OneDrive plugin keeps looping after start and fails with the following error:

    Code
    May 07 23:26:46 xxx onedrive[691796]: Reading configuration file: /var/cache/onedrive/config
    May 07 23:26:46 xxx onedrive[691796]: Invalid value for key in config file: verbose
    May 07 23:26:46 xxx onedrive[691796]: Configuration file has errors - please check your configuration

    The content of the file /var/cache/onedrive/config:

    openmediavault 7.7.6-1

    openmediavault-onedrive 7.1.4-3

    onedrive Version: 2.5.5-1+np1+1.1


    I assume I am not to mess with /var/cache/onedrive/config as indicated by the header. I changed it anyway and put a # in front of verbose = "true", understanding that it'll get overwritten eventually.


    After having to do omv-onedrive --reauth since the service has been inoperable for too long, a sync was successfully started.

    • New
    • Official Post

    According to https://github.com/openmediava…edrive/files/config.j2#L2 this config option is default to 0. If onedrive complains true is invalid, this means you've set the OMV_ONEDRIVE_VERBOSE environment variable manually to true. If you want to enable verbose, then you need to set it to a number, e.g. 1. See code in onedrive here and here.

  • votdev

    Added the Label resolved
  • votdev

    Added the Label OMV 7.x
  • Quote

    See code in onedrive here and here.

    Or just read the documentation .. thats why it exists .. no need to delve into reading code!!!


    Setting 'verbose' via config file, whilst it may work is not a supported option or method. Please set the option in the correct manner.


    References:

    • New
    • Official Post

    Or just read the documentation .. thats why it exists .. no need to delve into reading code!!!

    That's incorrect in this case. The verbose option is in the Command Line Interface (CLI) Only Options section. There is no explanation how to configure it correctly via config file.


    And to be honest I don't care because this is a user error and not a bug in my code. I just wanted to show the user where the problem lies.

  • Big oooof about the toxicity here. "The user is dumb, they should read the documentation" - well, the documentation specifies to set OMV_ONEDRIVE_VERBOSE to enable verbose mode. Which I did at some point in the past probably. Mea culpa for using a provided debugging feature.

    And to be honest I don't care because this is a user error and not a bug in my code. I just wanted to show the user where the problem lies.

    I wholeheartedly disagree about "user error". If setting an environment variable leads to the plugin generating an invalid config file, it is a bug in the plugin code.


    Thank you though for the workaround, I will remove the environment variable. It would be nice if there was a way to enable verbose mode in a simple way, since that is a reasonable thing to do - enable more logging in case other problems pop up. For me the plugin has always worked great

  • Also this!?

    Code
    root@graealexhd1:~# sudo omv-env list | grep OMV_ONEDRIVE_VERBOSE
    OMV_ONEDRIVE_VERBOSE
    root@graealexhd1:~# sudo omv-env unset OMV_ONEDRIVE_VERBOSE
    root@graealexhd1:~# sudo omv-env list | grep OMV_ONEDRIVE_VERBOSE
    OMV_ONEDRIVE_VERBOSE

    Am I too stupid to unset an environment variable?

    • New
    • Official Post

    Also this!?

    Code
    root@graealexhd1:~# sudo omv-env list | grep OMV_ONEDRIVE_VERBOSE
    OMV_ONEDRIVE_VERBOSE
    root@graealexhd1:~# sudo omv-env unset OMV_ONEDRIVE_VERBOSE
    root@graealexhd1:~# sudo omv-env list | grep OMV_ONEDRIVE_VERBOSE
    OMV_ONEDRIVE_VERBOSE

    Am I too stupid to unset an environment variable?

    The list command lists all existing environment variables.

  • The list command lists all existing environment variables.

    Thank you. Unsetting the variable produces the following entry in the config file:

    Code
    verbose = "0"

    This does not cause an error with onedrive, though. Why is it now "0" instead of "false" (where it had been "true" before)?

    you need to read the documentation carefully how to use the omv-env command

    Yes I am at fault the plugin produces an invalid configuration file by just setting an innocent environment variable that is supposed to just enable verbose mode. Clearly.


    2qgedk.png?a484824

  • Quote

    This does not cause an error with onedrive, though. Why is it now "0" instead of "false" (where it had been "true" before)?


    Because the 'onedrive' application you are using - that I am the developer and maintainer of .. this is an invalid configuration:


    Code
    verbose = "true"


    The 'onedrive' application type checks all 'config' options.


    Second point - the setting of 'verbose' in the 'config' file is unsupported. Whilst it may work - it is not supported.


    The correct way to enable verbose or debug mode is to add the following to your CLI commands


    Verbose Mode

    Code
    --verbose | -v

    Debug Mode

    Code
    --verbose --verbose | -v -v | -vv


    This is what is supported and is documented here:


    onedrive/docs/application-config-options.md at master · abraunegg/onedrive
    OneDrive Client for Linux. Contribute to abraunegg/onedrive development by creating an account on GitHub.
    github.com

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!