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

Deploy CI failed during "make upload" #58

Open
sanak opened this issue Feb 19, 2023 · 3 comments
Open

Deploy CI failed during "make upload" #58

sanak opened this issue Feb 19, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@sanak
Copy link
Member

sanak commented Feb 19, 2023

Describe the bug
Deploy CI failed during make upload with SyntaxError: Unexpected token < in JSON at position 0 error from #57 commit.
https://github.com/Georepublic/miyamoto/actions/runs/4201622444/jobs/7288808913

To Reproduce
Run make upload.

Expected behavior
The error should not be happen and Google App Script should be updated.

@sanak sanak added the bug Something isn't working label Feb 19, 2023
@sanak sanak self-assigned this Feb 19, 2023
@sanak
Copy link
Member Author

sanak commented Feb 19, 2023

On my local environment, running make dev returned the following error.

% make dev   
echo "/* Miyamoto-san https://github.com/masuidrive/miyamoto/ */" > main.gs
echo "/* (c) masuidrive 2014- License: MIT */" >> main.gs
echo "/* ------------------- */" >> main.gs
cat scripts/*.js | sed -e "s/::VERSION::/`head VERSION`/g" >> main.gs
./node_modules/gas-manager/bin/gas upload -c ./gas-config.json -s ./gas-project-dev.json
can't change type of existing file

/Users/sanak/Projects/georepublic/git/miyamoto/node_modules/gas-manager/out/lib/commands/upload-command.js:91
        throw err;
        ^
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "notFound",
    "message": "File not found: 1MozTVoUShzWlsex-YXBhR9VNkRxfH39G21eCz-kFIrk9C3ELApGLzmoM",
    "locationType": "other",
    "location": "file"
   }
  ],
  "code": 404,
  "message": "File not found: 1MozTVoUShzWlsex-YXBhR9VNkRxfH39G21eCz-kFIrk9C3ELApGLzmoM"
 }
}

(Use `node --trace-uncaught ...` to show where the exception was thrown)
make: *** [dev] Error 1

@sanak
Copy link
Member Author

sanak commented Feb 19, 2023

Well, above my local environment issue, moving Google Apps Script from my drive to company drive seems to be the cause of the issue.
After moving back it to my drive, make dev succeeded without error.

@sanak
Copy link
Member Author

sanak commented Feb 22, 2023

@halsk I couldn't reproduce this issue on my local development environment (by running make dev), so could you check whether your environment key (secrets) settings are correct ?
https://github.com/Georepublic/miyamoto/blob/master/.github/workflows/deploy.yml#L25-L28

      env: # Or as an environment variable
        CLIENT_ID: ${{ secrets.GAS_CLIENT_ID }}
        CLIENT_SECRET: ${{ secrets.GAS_CLIENT_SECRET }}
        REFRESH_TOKEN: ${{ secrets.GAS_REFRESH_TOKEN }}

@sanak sanak assigned halsk and unassigned sanak Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants