Skip to content
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

Getting a SyntaxError: Unexpected token 'v', "version ht"... is not valid JSON on github connection #3456

Closed
5 tasks done
gabrielAHN opened this issue May 4, 2023 · 10 comments
Labels
archived This issue has been locked. console The issue is related to performing an action in the Amplify console question Further information is requested

Comments

@gabrielAHN
Copy link

Before opening, please confirm:

  • I have checked to see if my question is addressed in the FAQ.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

App Id

New_app

AWS Region

us-east-1

Amplify Hosting feature

Git providers

Describe the bug

When connecting github I am getting this error
Screenshot 2023-05-03 at 11 36 45 PM

Checking github all is authorized as seen below:
Screenshot 2023-05-03 at 11 37 33 PM

Have uninstalled and reinstalled the above application not sure what else

Expected behavior

To be able to connect to github repo

Reproduction steps

  1. start new amplify application
  2. Try to connect github to branches, and getting error

Build Settings

there is none

Log output

There was an error detecting your build settings.
SyntaxError: Unexpected token 'v', "version ht"... is not valid JSON

Additional information

No response

@gabrielAHN gabrielAHN added bug Something isn't working pending-triage labels May 4, 2023
@SamKomesarook
Copy link

@gabrielAHN how are you going to build & deploy without any build settings? They're probably required by amplify..

@gabrielAHN
Copy link
Author

@gabrielAHN how are you going to build & deploy without any build settings? They're probably required by amplify..

Yes but doesn’t amplify create a build setting if it doesn’t detect it? Also, had one in my repo with the same effect sadly

@SamKomesarook
Copy link

@gabrielAHN I couldn't find that in the docs, but the build script should be set in the Amplify setup steps, not present in the repo. Could you share the build script you tested with and what framework you're using?

@gabrielAHN
Copy link
Author

Here would be it amplify.yml.zip
And using react framework

@ghost
Copy link

ghost commented May 4, 2023

Hi @gabrielAHN 👋🏽 can you confirm if you have any errors in your package.json file? I was not able to return the same exact error that you're seeing but I added some non-JSON text to package.json and returned a similar error There was an error detecting your build settings. when trying to select that repository.

If you could provide us a repo that reproduces the same error, that would help us determine the issue.

@ghost ghost added question Further information is requested console The issue is related to performing an action in the Amplify console response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed bug Something isn't working pending-triage labels May 4, 2023
@ghost ghost self-assigned this May 4, 2023
@gabrielAHN
Copy link
Author

Hey @hloriii 👋

Just sent an invite to the repo ghn let us know if you were able to get access and are able to replicate the behavior?

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label May 5, 2023
@gabrielAHN
Copy link
Author

Hey found it is related to the package.json being in the directory, which is confusing since package.json is needed. How would I fix this?
Screenshot 2023-05-10 at 8 44 12 PM

When I remove package json it stops working

@ghost
Copy link

ghost commented May 12, 2023

Hi @gabrielAHN thanks for providing the additional information. I'll take a look at the package.json and try to pinpoint the issue. Will update shortly.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot added the archived This issue has been locked. label May 12, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. console The issue is related to performing an action in the Amplify console question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants