Closed linqcan closed 3 years ago
Hey!
Do you get any errors in the logs modal?
I tried to fork it and deploy it and it worked
This:
Start Build...
npm install
> core-js@2.6.11 postinstall /codebuild/output/src629601547/src/package/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js@3.6.5 postinstall /codebuild/output/src629601547/src/package/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
added 1623 packages from 832 contributors and audited 1627 packages in 30.156s
found 2 vulnerabilities (1 low, 1 high)
run `npm audit fix` to fix them, or `npm audit` for details
npm install netlify-cli -g
/usr/local/bin/ntl -> /usr/local/lib/node_modules/netlify-cli/bin/run
/usr/local/bin/netlify -> /usr/local/lib/node_modules/netlify-cli/bin/run
> netlify-cli@2.59.1 postinstall /usr/local/lib/node_modules/netlify-cli
> node ./scripts/postinstall.js
Success! Netlify CLI has been installed!
Your device is now configured to use Netlify CLI to deploy and manage your Netlify sites.
Next steps:
netlify init Connect or create a Netlify site from current directory
netlify deploy Deploy the latest changes to your Netlify site
For more information on the CLI run netlify help
Or visit the docs at https://cli.netlify.com
+ netlify-cli@2.59.1
added 1075 packages from 558 contributors in 47.997s
running build command
> react-typescript@1.0.0 build /codebuild/output/src629601547/src/package
> react-scripts build
The following changes are being made to your tsconfig.json file:
- compilerOptions.target to be suggested value: es5 (this can be changed)
- compilerOptions.allowJs to be suggested value: true (this can be changed)
- compilerOptions.skipLibCheck to be suggested value: true (this can be changed)
- compilerOptions.allowSyntheticDefaultImports to be suggested value: true (this can be changed)
- compilerOptions.forceConsistentCasingInFileNames to be suggested value: true (this can be changed)
- compilerOptions.module must be esnext (for import() and import/export)
- compilerOptions.moduleResolution must be node (to match webpack resolution)
- compilerOptions.resolveJsonModule must be true (to match webpack loader)
- compilerOptions.isolatedModules must be true (implementation limitation)
- compilerOptions.noEmit must be true
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
51.19 KB build/static/js/2.4ce150ac.chunk.js
794 B build/static/js/main.1998e12d.chunk.js
779 B build/static/js/runtime-main.9c7c50c1.js
The project was built assuming it is hosted at the server root.
You can control this with the homepage field in your package.json.
For example, add this to build it for GitHub Pages:
"homepage" : "http://myname.github.io/myapp",
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
Find out more about deployment here:
bit.ly/CRA-deploy
netlify deploy
Deploying to main site URL...
- Hashing files...
✔ Finished hashing 11 files
- CDN diffing files...
✔ CDN requesting 6 files
- Uploading 6 files
› Warning: JSONHTTPError: Origin returned error code 401
› Warning:
› {
› "name": "JSONHTTPError",
› "status": 401,
› "json": {
› "code": 401,
› "message": "Origin returned error code"
› }
› }
›
JSONHTTPError: Unauthorized
echo 'Initial file upload deleted'
Initial file upload deleted
This from js console (could be unrelated):
This is from Netlify:
Hey!
A 401 is a weird error we have gotten once, it means there is already a netlifly deploy with the same id as the sandbox you are trying to deploy :/
Can you please fork the sandbox and try again? You can then delete the original one
Sorry about the issue, this is really hard to test
Forking it and deploying again does work.
You decide if you want to close this issue or keep it open to find the root cause.
I am going to leave it open and rename the title to be more descriptive since I know it's a forbidden error
@SaraVieira I managed to reproduce the error again by doing the following:
Start Build...
npm install
> core-js@2.6.11 postinstall /codebuild/output/src840190658/src/package/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js@3.6.5 postinstall /codebuild/output/src840190658/src/package/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
added 1487 packages from 696 contributors and audited 1491 packages in 26.369s
found 5 vulnerabilities (1 low, 2 moderate, 2 high)
run `npm audit fix` to fix them, or `npm audit` for details
npm install netlify-cli -g
/usr/local/bin/ntl -> /usr/local/lib/node_modules/netlify-cli/bin/run
/usr/local/bin/netlify -> /usr/local/lib/node_modules/netlify-cli/bin/run
> netlify-cli@2.59.1 postinstall /usr/local/lib/node_modules/netlify-cli
> node ./scripts/postinstall.js
Success! Netlify CLI has been installed!
Your device is now configured to use Netlify CLI to deploy and manage your Netlify sites.
Next steps:
netlify init Connect or create a Netlify site from current directory
netlify deploy Deploy the latest changes to your Netlify site
For more information on the CLI run netlify help
Or visit the docs at https://cli.netlify.com
+ netlify-cli@2.59.1
added 1076 packages from 558 contributors in 28.024s
running build command
> react@1.0.0 build /codebuild/output/src840190658/src/package
> react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
39.88 KB build/static/js/2.32bdae52.chunk.js
762 B build/static/js/runtime~main.a8a9905a.js
335 B build/static/js/main.ee6685c3.chunk.js
118 B build/static/css/main.9b1431d8.chunk.css
The project was built assuming it is hosted at the server root.
You can control this with the homepage field in your package.json.
For example, add this to build it for GitHub Pages:
"homepage" : "http://myname.github.io/myapp",
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
Find out more about deployment here:
https://bit.ly/CRA-deploy
netlify deploy
Deploying to main site URL...
- Hashing files...
✔ Finished hashing 12 files
- CDN diffing files...
✔ CDN requesting 6 files
- Uploading 6 files
› Warning: JSONHTTPError: Origin returned error code 401
› Warning:
› {
› "name": "JSONHTTPError",
› "status": 401,
› "json": {
› "code": 401,
› "message": "Origin returned error code"
› }
› }
›
JSONHTTPError: Unauthorized
echo 'Initial file upload deleted'
Initial file upload deleted
Am I using the feature correctly? If not, how am I supposed to (re-)deploy my changes to Netlify?
Hey!
Did you change the name of the project on netlifly? This definitely should not happen
No, I did nothing but clicking the "Deploy to Netlify" button (and claiming the site the first time).
Then there must be a problem with the claiming it's not recognizing it's your site
I will take a look at this on monday
Sorry about the issue
I'm getting the same error as @linqcan. I didn't change the name. However, I added a custom domain to the sandbox on Netlify. If I fork the sandbox it works. If I deploy the forked sandbox again, I receive this:
Start Build...
npm install
> core-js@2.6.11 postinstall /codebuild/output/src904427720/src/package/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js@3.6.5 postinstall /codebuild/output/src904427720/src/package/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> core-js-pure@3.6.5 postinstall /codebuild/output/src904427720/src/package/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"
added 1600 packages from 756 contributors and audited 1604 packages in 26.985s
found 0 vulnerabilities
npm install netlify-cli -g
/usr/local/bin/ntl -> /usr/local/lib/node_modules/netlify-cli/bin/run
/usr/local/bin/netlify -> /usr/local/lib/node_modules/netlify-cli/bin/run
> netlify-cli@2.61.0 postinstall /usr/local/lib/node_modules/netlify-cli
> node ./scripts/postinstall.js
Success! Netlify CLI has been installed!
Your device is now configured to use Netlify CLI to deploy and manage your Netlify sites.
Next steps:
netlify init Connect or create a Netlify site from current directory
netlify deploy Deploy the latest changes to your Netlify site
For more information on the CLI run netlify help
Or visit the docs at https://cli.netlify.com
+ netlify-cli@2.61.0
added 1055 packages from 558 contributors in 29.725s
running build command
> portfolio@1.0.0 build /codebuild/output/src904427720/src/package
> react-scripts build
Creating an optimized production build...
Compiled successfully.
File sizes after gzip:
190.75 KB build/static/js/2.d0f14079.chunk.js
822 B build/static/js/main.ab7b51df.chunk.js
772 B build/static/js/runtime-main.19ccc7f6.js
472 B build/static/css/main.c3e9eb78.chunk.css
The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.
The build folder is ready to be deployed.
You may serve it with a static server:
npm install -g serve
serve -s build
Find out more about deployment here:
bit.ly/CRA-deploy
netlify deploy
Deploying to main site URL...
- Hashing files...
✔ Finished hashing 13 files
- CDN diffing files...
✔ CDN requesting 8 files
- Uploading 8 files
› Warning: JSONHTTPError: Origin returned error code 401
› Warning:
› {
› "name": "JSONHTTPError",
› "status": 401,
› "json": {
› "code": 401,
› "message": "Origin returned error code"
› }
› }
›
JSONHTTPError: Unauthorized
echo 'Initial file upload deleted'
Initial file upload deleted
Thanks
This is happening to me too. I did claim the site but didn't change the name.
Hi @SaraVieira! Any updates on this?
Hey!
Not on a fix and I was not able to reproduce but it seems that when you hit a 401 it's because a site with that name already exists on Netlify so you will need to fork and then try to deploy again
I guess its a problem of Netlify being so big and we also having so many sandboxes :(
Same thing as others... the first deploy works and subsequent deploys get the 401. Is this the intended way to deploy updates to a sandbox on Netlify (go in and click deploy again from the rocket menu) or is there another process?
Hey
Are you using the same account? This has only happened as I knew from trying to overwrite someone else's website
Also yes, this is the only way to deploy updates currently
I'll try it again and write down exact steps I take.
I'm attaching the logs from both deploy attempts, scrubbed of anything that looked potentially sensitive. I can send original logs if needed, either here if the scrubbed info isn't actually sensitive or via email if it is.
I hope this helps. Thank you for looking into it!
Ohhh, I understand the issue
So what we do is that we never attach you as the owner of the site because you never log in to netlify on our platform so what happens is that when you claim the site that site now has an owner and we have no way of knowing that is you because we do not log you into netlify and so it returns back a 401 because it doesn't recognize you as the owner of the site you are trying to update.
This is definitely something we should work on by adding a netlifly login button but I hope this explanation makes sense
So to make sure I'm understanding... The redeployment to Netlify is only expected to work if the site hasn't been claimed? This is turns means no Netlify dashboard access to the site, right?
Yes, when you claim it you loose access to updating it on CodeSandbox because you are not logged in to netlify
Not saying it's a good system btw, it's a problem
This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.
This issue has been automatically closed because there wasn't any activity after the previous notice or the stale label wasn't removed.
Hey!
A 401 is a weird error we have gotten once, it means there is already a netlifly deploy with the same id as the sandbox you are trying to deploy :/
Can you please fork the sandbox and try again? You can then delete the original one
Sorry about the issue, this is really hard to test
I'm sorry for bagging on the conversation, but please is there a way to change the domain of the codesandbox while deploying to netlify
Hey @OlaoyeVic - Be default Netlify deployments go to CodeSandbox Netlify account - you could request ownership of your deployments to be moved to your own Netlify account and then set any domain.
🐛 bug report
Description of the problem
When using the "Deploy to Netlify" button, the created deploy at Netlify does nothing and never finishes.
How has this issue affected you? What are you trying to accomplish?
Unable to deploy my sandbox.
The Netlify has referred me to you, see this thread: https://community.netlify.com/t/deploy-from-codesandbox-doesnt-work/21200/6
Link to sandbox: [link]() (optional)
https://codesandbox.io/s/hungry-kirch-3nh32
Your Environment