cannot read properties of undefined (reading 'tolowercase')


Go to solution Solved by daddyfatsaks,

Recommended Posts

Greetings,after updating to unraid 6.11.5 I see the Myservers error "cannot read properties of undefined (reading 'tolowercase')". I have never really been able to get the myservers plugin working and I was excited to see there were some fixes in the latest update but now I see this error and still have no the no connection to mothership for myservers. I also noticed when I tried to sign out of unraid.net I get a popup window saying "This USB Flash device has an invalid GUID. Please try a different USB Flash device.", and I feel this is all related. Should I swap the USB for a new one? I have tried restarting the server with no positive results. Any thoughts would be greatly appreciated. 

error2.JPG

error3.JPG

error.JPG

Link to comment
  • 2 months later...
3 hours ago, daddyfatsaks said:

THank you for the update

 

Hmm, would you please click on your username in the upper right corner of the webgui and choose "Sign out of Unraid.net". Reload the page and then sign back in? I want to see if there is an issue with your profile.

 

If you still get the same error message from your screenshot, please open a web terminal and show the output of `unraid-api report`

Link to comment

By the way here is the output of the terminal command:

 

<-----UNRAID-API-REPORT----->
SERVER_NAME: Shaolin
ENVIRONMENT: production
UNRAID_VERSION: 6.11.5
UNRAID_API_VERSION: 3.0.0
UNRAID_API_STATUS: running
API_KEY: NO_API_KEY
MY_SERVERS: authenticated
MY_SERVERS_USERNAME: daddyfatsaks
CLOUD: 
        STATUS: [ok]  
MINI-GRAPH: 
        STATUS: [PRE_INIT]
        ERROR: [API Disconnected]
</----UNRAID-API-REPORT----->

Link to comment

Experiencing the same problem on one of my Unraid servers, the other is working fine.  Unable to remove the Unraid Connect plugin or logout locally.  Docker containers are running fine.

Edited by Scout800
Link to comment

Hi folks, please update to today's release:

  https://forums.unraid.net/topic/138392-unraid-connect-plugin-announcements/#comment-1257785

 

It should be impossible to see this message any longer:

  "cannot read properties of undefined (reading 'tolowercase')"

but I am not sure what it will be replaced with as we have not been able to reproduce this.

 

If you continue to have issues, please go to Settings -> Management Access -> Unraid Connect and see the new section on how to download and submit logs. Once we have the logs we should be able to get to the bottom of this.

Link to comment

Looking at my logs I noticed this in my unraid-api.txt:

Logging in user: daddyfatsaks
Failed loading state file from "/usr/local/emhttp/state/var.ini" with "Value "y%s" is not false/true or no/yes."
UPNP Enabled: (undefined)  Wan Port: [Will Generate New WAN Port]

 

<-----UNRAID-API-REPORT----->
SERVER_NAME: Shaolin
ENVIRONMENT: production
UNRAID_VERSION: 6.11.5
UNRAID_API_VERSION: 3.1.0
UNRAID_API_STATUS: running

API_KEY: NO_API_KEY
MY_SERVERS: authenticated
MY_SERVERS_USERNAME: daddyfatsaks
CLOUD: 
    STATUS: [ok]  
MINI-GRAPH: 
    STATUS: [PRE_INIT]
    ERROR: [API Disconnected]
</----UNRAID-API-REPORT----->

 

When I go to sign out of unraid connect I am able this time but when I sign back in I still get this:

image.png.716c7cba80f3edbb6213bef88b493e65.png

 

I tried to sign out again and its back to not letting me. 

I also did an unraid-api restart. no change. 

Edited by daddyfatsaks
Link to comment

Installed the latest update for unraid connect. but nothing new. Still get the same error as above. I never heard back or got confirmation that my logs were recieved, viewed or helpful. So I guess this is the end until I find or hear something. Unfortunate as my flash backup has been disabled and I will have to find another method of making sure I have backups. This plugin is useless to me at this point, so I believe uninstalling it would be the way to go for now since I don't like seeing a big error symbol every time I log in. Thanks for the help.

 

image.thumb.png.33b111f1f2a07cada8ded4e23fb202f8.png 

Link to comment
  • Solution

OK, wanted to spread the knowledge of the solution to the above problem. I essentially had a corrupt flash drive, meaning there were the following line was:

shareNFSEnabled="y%s"

 

but should have been:

shareNFSEnabled="no"

or

shareNFSEnabled="yes"

 

Especially since I didnt have NFS shares turned on in settings. This was what was causing the error. Not sure how it happened but here is how it was fixed. 

 

1. go to Settings -> NFS. NFS is probably disabled, please enable it and Apply. Then disable it and apply.

2. open a terminal and run: 

grep shareNFSEnabled /usr/local/emhttp/state/var.ini

 

and it should output:

shareNFSEnabled="no"

 

And fingers crossed, the problem will be resolved. <----------- very important. 

 

Thank you to unraid tech support, especially to ljm42 for working the problem out with me and showing patience. 

  • Like 2
Link to comment

Thanks for working through that @daddyfatsaks

 

This was very enlightening, the reason we were never able to reproduce this is that it only happens when a config file on the flash drive is corrupted or has an unexpected value.

 

When Unraid read this line of your config:

shareNFSEnabled="y%s"

it said "'y%s' is not 'yes' so I will treat it as 'no'", but when the API read that line it said "I don't know what 'y%s' means so I will throw an error". This is why Unraid itself didn't have any issues with the corrupt value but the API did.

 

We will update the API so that it falls back to the same defaults that the OS does when there is an unexpected value in a config file.

 

In the meantime, if anyone else has this problem we need to review your Unraid API logs and config data to see where the corruption is. This may have sensitive data, so rather than post it publicly please create a support request here:
  https://unraid.net/contact 
Watch for an email saying your case was created, reply to it with the info below.

 

First, go to the Plugins tab and check for updates to ensure you are on the latest version of Connect.

 

Then to Settings -> Management Access -> Unraid Connect and download your unraid-api logs, and attach those to your reply.

 

Also open a web terminal and run:

cat /usr/local/emhttp/state/var.ini

and copy/paste the results of that into your reply.

 

With this we should be able to tell which file has the corruption and help you recover from it.

Link to comment