-
-
Notifications
You must be signed in to change notification settings - Fork 18
-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Unhandled rejection SyntaxError: Unexpected token in JSON at position 0 #28
Comments
@jeffymahoney based on the error message im guessing this is where things are going awry for you As of now Lando has assumed the files in Regardless, we should also improve Lando to throw a better error message when this happens. It would be great to know what file actually was invalid JSON and how it was invalid. |
@jeffymahoney let us know what you find in the |
I have only one file in the ~/.terminus/cache/tokens folder. It contains valid JSON. The name of the file is a private email address with no characters other than lowercase ascii and the @ symbol. The contents of the file are valid JSON. The file has exactly one line and no linebreaks. The line is:
I have changed the email address for privacy reasons. Removing this folder did indeed get lando working again. Thanks so much, both of you, for your quick help with this. I haven't looked into how Lando is built and I don't know how to debug, troubleshoot, and contribute back yet. One of these days I'll take the time to learn how Lando works and be able to contribute back with pull requests, but I'm just not there yet :( Please reach out to me if you'd like more information. I'd be happy to do a Zoom meeting or similar if you can't reproduce and you'd like to find out what it is about my system that caused this. |
I have changed your token for similar privacy reasons! good to know, not sure why lando would say thats an invalid JSON file if it isnt, especially if removing that directory fixed it. we dont modify that directory, only read from it so i think the "bug fix" we'd want to do here is just throwing a more helpful error if lando cannot read any of the files in that directory correctly |
I removed that token from Pantheon before I posted it here, so no big deal :) I wanted to give you something as close to the real thing as possible. Some error handling in that code block would certainly be nice :) |
Agreed. It would be great to understand why exactly there was invalid JSON in there but regardless a better error message is easy enough to do. |
This will be fixed in 3.0.8 |
Hi, I'm getting the same error in 3.0.26 or 3.0.28 (using the command
Deleting the file "fixes" the error. |
I got the similar error - which make me come here The lando file was big, but there was small error - which was causing the problem. name: Drupalmerc
recipe: drupal9
config:
build:
run_scripts: true
composer_version: '2.4.3'
via: apache
drush: true
php: '8.1' Now, after lot of head crunching, the name should be all small so, I have change only the name key Changed : name: drupalmerc
... |
3.0.7 on Mac Mojave
When I try any lando command from any path, including just running
lando
with no arguments, I get the following error:Tell us more
I have tried uninstalling and reinstalling Lando (including removing ~/.lando) and Docker multiple times.
I've tried with 3.0.7, 3.0.5, and 3.0.1.
I've searched the issue queue here and haven't found anything in all the issues ever filed.
I updated my version of Node to the latest LTS which didn't help.
I've spent all today, Sunday, trying to get it to work on a personal project. Yesterday it was working fine; I had multiple drupal 8 instances running without any issue. I have been using it all week on yet another project. The only real difference about the project I was trying to get to work today is that it's a Pantheon recipe. I was in the middle of setting up authorization with Terminus and setting up a pantheon.yml file, but started to run into errors like the one above.
Does this bug prevent you from using lando? Yes
The text was updated successfully, but these errors were encountered: