scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.41k stars 3.49k forks source link

Travis deploy of scratch-gui crashes silently, falsely claims successful deploy #4880

Open benjiwheeler opened 5 years ago

benjiwheeler commented 5 years ago

In this build and others: https://travis-ci.org/LLK/scratch-gui/builds/539304132 , Travis appears to successfully deploy scratch-gui to npm:

Deploying application
> scratch-gui@0.1.0-prerelease.20190530164635 deploy /home/travis/build/LLK/scratch-gui
> touch build/.nojekyll && gh-pages -t -d build -m "Build for $(git log --pretty=format:%H -n1)" "-x" "-e" "develop" "-r" "https://[secure]@github.com/LLK/scratch-gui.git"
Published

...but if you run npm info scratch-gui, even 40 minutes after this apparent deploy, it's clear that the deploy never went through:

> npm info scratch-gui

scratch-gui@0.1.0-prerelease.20190530153420 | BSD-3-Clause | deps: none | versions: 791
GraphicaL User Interface for creating and running Scratch 3.0 projects
https://github.com/LLK/scratch-gui#readme

dist
.tarball: https://registry.npmjs.org/scratch-gui/-/scratch-gui-0.1.0-prerelease.20190530153420.tgz
.shasum: eb543a0d5321a4568270d7417b8ef94c4c060753
.integrity: sha512-5cTGYwtgaonRpZVUWOAHrDXyhU7Q6yNfQ7qE1i6W9cmrRO2VjIsq7Ws/PA1qvyHT0eesNGdFstiw48okbQnSNQ==
.unpackedSize: 218.1 MB

maintainers:
- scratch <scratchr-sysadmin@media.mit.edu>

dist-tags:
develop: 0.1.0-prerelease.20190201191527  hotfix: 0.1.0-prerelease.20190520180857   latest: 0.1.0-prerelease.20190530153420   stable: 0.1.0-prerelease.20190215143519

What's going on?

Well, if you look further up the Travis log, and expand the first of the three lines that says Deploying application, you'll see this:

Installing deploy dependencies
Successfully installed dpl-npm-1.10.10
Parsing documentation for dpl-npm-1.10.10
Installing ri documentation for dpl-npm-1.10.10
Done installing documentation for dpl-npm after 0 seconds
1 gem installed
dpl.2
Preparing deploy
NPM version: 6.4.1
Authenticated with email [secure] and API key ****************fb29
NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc.
http://docs.travis-ci.com/user/deployment/npm/
~/.npmrc size: 48
dpl.3
Deploying application
npm notice 
npm notice 📦  scratch-gui@0.1.0-prerelease.20190530164635
npm notice === Tarball Contents === 
npm notice 5.1kB   package.json                                                            
npm notice 426B    .babelrc            

... many more lines skipped ...

npm notice === Tarball Details === 
npm notice name:          scratch-gui                             
npm notice version:       0.1.0-prerelease.20190530164635         
npm notice package size:  183.7 MB                                
npm notice unpacked size: 218.1 MB                                
npm notice shasum:        34fe08fadfa5725cd880434a28458a82908e9b6a
npm notice integrity:     sha512-/GyzwrS+oaY6s[...]PP17b4Qe2B0uA==
npm notice total files:   1036                                    
npm notice 
<--- Last few GCs --->
[9780:0x3e80530]    61147 ms: Mark-sweep 955.4 (1042.8) -> 954.8 (1054.3) MB, 53.3 / 0.0 ms  allocation failure GC in old space requested
[9780:0x3e80530]    61202 ms: Mark-sweep 954.8 (1054.3) -> 954.8 (1023.3) MB, 55.4 / 0.0 ms  last resort GC in old space requested
[9780:0x3e80530]    61261 ms: Mark-sweep 954.8 (1023.3) -> 954.8 (1023.3) MB, 59.4 / 0.0 ms  last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x179c9cc25891 <JSObject>
    1: _writeGeneric [net.js:759] [bytecode=0x1096b9619e61 offset=351](this=0x2153aeb3f19 <TLSSocket map = 0x2beb61408089>,writev=0x261c77682371 <true>,data=0x2b9e1cd2e7f1 <JSArray[2]>,encoding=0x261c77682431 <String[0]: >,cb=0x2153aeb48f9 <JSBoundFunction (BoundTargetFunction 0x4e0b8c37cd9)>)
    2: _writev [net.js:782] [bytecode=0x9f721fe6e41 offset=23](this=0x2153aeb3f19 <TLSSocket map = 0x2b...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [npm]
 2: 0x8cd14c [npm]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [npm]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [npm]
 5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [npm]
 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [npm]
 7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [npm]
 8: v8::String::WriteUtf8(char*, int, int*, int) const [npm]
 9: node::StringBytes::Write(v8::Isolate*, char*, unsigned long, v8::Local<v8::Value>, node::encoding, int*) [npm]
10: node::StreamBase::Writev(v8::FunctionCallbackInfo<v8::Value> const&) [npm]
11: void node::StreamBase::JSMethod<node::TLSWrap, &node::StreamBase::Writev>(v8::FunctionCallbackInfo<v8::Value> const&) [npm]
12: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [npm]
13: 0xb0f37c [npm]
14: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [npm]
15: 0x27ca1a9842fd

^^ YIKES, it totally crashed!

Our Travis builds should not appear to complete successfully and deploy, when they really crashed.

(Note that rerunning this build worked fine: https://travis-ci.org/LLK/scratch-gui/builds/539330732 )

benjiwheeler commented 5 years ago

This happened again, at https://travis-ci.org/LLK/scratch-gui/builds/577978767?utm_source=github_status&utm_medium=notification .

After restarting twice, the third build successfully deployed to npm.

Log:

store build cache
0.00s27.37schanges detected (content changed, file is created, or file is deleted):\n/home/travis/.npm/anonymous-cli-metrics.json
/home/travis/.npm/_cacache/index-v5/01/4b/d705cd09f8e5361b2111ab9d43d35960161d37d0ea380764c6dfa4333537
/home/travis/.npm/_cacache/index-v5/03/87/421166c921d0547cfa62fb8708d21b55ad4632b2b2db5bd5443ee048866b
/home/travis/.npm/_cacache/index-v5/09/6f/f2013dea4fa515ab796aeedfd003d151911b7fb84481c93668a147a03166
/home/travis/.npm/_cacache/index-v5/0c/0d/88700fff581f52b2f764ad35933fd065f8223d5545bdbb10772eb0a28916
/home/travis/.npm/_cacache/index-v5/0c/da/e8654aad33bbbf62a4857fbf8beed9c4ce05a6b6fee192da0d679cf0e3cc
/home/travis/.npm/_cacache/index-v5/0f/bf/787d382d50b98c9dddeb1bd7d721c22c9f3848c05052b42aeb4a9f3e64ec
/home/travis/.npm/_cacache/index-v5/12/df/82a28f9cb584d692ca7f0b04145fddda106cb87b898739917b44359682b2
/home/travis/.npm/_cacache/index-v5/12/e6/adcab1be7b7fc14da117a64bb8a260f85ebe31592aac409bef55659ce4f9
/home/travis/.npm/_cacache/index-v5/14/36/c2fbbfb91ed4e23ae02c15f665a55e56f73e1f774e485f663c63ddd92a59
/home/travis/.npm/_cacache/i\n...
changes detected, packing new archive
uploading develop/cache-linux-trusty-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--node-8.tgz
cache uploaded
before_deploy
0.39s$ if [ -z "$BEFORE_DEPLOY_RAN" ]; then
        npm --no-git-tag-version version $RELEASE_VERSION
        if [ "$TRAVIS_BRANCH" == "master" ]; then export NPM_TAG=stable; fi
        if [[ "$TRAVIS_BRANCH" == hotfix/* ]]; then export NPM_TAG=hotfix; fi # double brackets are important for matching the wildcard
        git config --global user.email $(git log --pretty=format:"%ae" -n1)
        git config --global user.name $(git log --pretty=format:"%an" -n1)
        export BEFORE_DEPLOY_RAN=true
      fi

v0.1.0-prerelease.20190828174013
dpl_0
2.41s$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl
Successfully installed dpl-1.10.12
Parsing documentation for dpl-1.10.12
Installing ri documentation for dpl-1.10.12
Done installing documentation for dpl after 0 seconds
1 gem installed
177.70s
dpl.1
Installing deploy dependencies
Successfully installed dpl-npm-1.10.12
Parsing documentation for dpl-npm-1.10.12
Installing ri documentation for dpl-npm-1.10.12
Done installing documentation for dpl-npm after 0 seconds
1 gem installed
dpl.2
Preparing deploy
NPM version: 6.11.2
Authenticated with email [secure] and API key ****************fb29
NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc.
http://docs.travis-ci.com/user/deployment/npm/
~/.npmrc size: 48
dpl.3
Deploying application
npm notice 
npm notice 📦  scratch-gui@0.1.0-prerelease.20190828174013
npm notice === Tarball Contents === 
npm notice 426B    .babelrc                                                                
npm notice 37B     .browserslistrc                                                         
npm notice 162B    .editorconfig                                                           
npm notice 30B     .eslintignore                                                           
npm notice 1.0kB   .gitattributes                                                          
npm notice 173B    .tx/config                                                              
npm notice 1.5kB   LICENSE                                                                 
npm notice 319B    TRADEMARK                                                               
npm notice 1.1kB   src/components/menu-bar/account-nav.css                                 
npm notice 4.8kB   src/components/action-menu/action-menu.css                              
npm notice 2.0kB   src/components/alerts/alert.css                                         
npm notice 72B     src/components/alerts/alerts.css                                        
npm notice 734B    src/components/asset-panel/asset-panel.css                              
npm notice 2.8kB   src/components/audio-trimmer/audio-trimmer.css                          
npm notice 794B    src/components/menu-bar/author-info.css                                 
npm notice 2.0kB   src/components/backpack/backpack.css                                    
npm notice 86B     src/playground/blocks-only.css                                          
npm notice 2.5kB   src/components/blocks/blocks.css                                        
npm notice 9B      src/components/box/box.css                                              
npm notice 1.5kB   src/components/browser-modal/browser-modal.css                          
...SEVERAL HUNDRED LINES OMITTED...
npm notice 4.3kB   dist/static/blocks-media/icons/wedo_motor-speed_med.svg                 
npm notice 4.4kB   dist/static/blocks-media/icons/wedo_motor-speed_slow.svg                
npm notice 4.7kB   dist/static/blocks-media/icons/wedo_when-distance_close.svg             
npm notice 4.9kB   dist/static/blocks-media/icons/wedo_when-tilt-backward.svg              
npm notice 4.9kB   dist/static/blocks-media/icons/wedo_when-tilt-forward.svg               
npm notice 3.7kB   dist/static/blocks-media/icons/wedo_when-tilt-left.svg                  
npm notice 3.7kB   dist/static/blocks-media/icons/wedo_when-tilt-right.svg                 
npm notice 4.1kB   dist/static/blocks-media/icons/wedo_when-tilt.svg                       
npm notice 9.7kB   src/lib/libraries/extensions/wedo2/wedo-button-illustration.svg         
npm notice 18.9kB  src/lib/libraries/extensions/wedo2/wedo-illustration.svg                
npm notice 13.7kB  src/lib/libraries/extensions/wedo2/wedo-small.svg                       
npm notice 9.8kB   dist/static/blocks-media/extensions/wedo2-block-icon.svg                
npm notice 634B    dist/static/blocks-media/zoom-in.svg                                    
npm notice 582B    dist/static/blocks-media/zoom-out.svg                                   
npm notice 501B    dist/static/blocks-media/zoom-reset.svg                                 
npm notice 560B    src/lib/default-project/83a9787d4cb6f3b7632b4ddfebf74367.wav            
npm notice 37.4kB  src/lib/default-project/83c36d806dc92327b9e7049a565c6bff.wav            
npm notice 3.2kB   dist/static/blocks-media/click.wav                                      
npm notice 11.9kB  dist/static/blocks-media/delete.wav                                     
npm notice 2.7kB   .travis.yml                                                             
npm notice === Tarball Details === 
npm notice name:          scratch-gui                             
npm notice version:       0.1.0-prerelease.20190828174013         
npm notice package size:  196.5 MB                                
npm notice unpacked size: 232.4 MB                                
npm notice shasum:        695f923bc746a8d4209952d021f8155320ddb1d4
npm notice integrity:     sha512-Xtr1Sp8oDMONj[...]HXnCz858Zj2Rw==
npm notice total files:   1191                                    
npm notice 
npm ERR! code E500
npm ERR! 500 Internal Server Error - PUT https://registry.npmjs.org/scratch-gui
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2019-08-28T17_54_49_554Z-debug.log
after_deploy
0.54s$ curl -X POST -H "Fastly-Key: $FASTLY_TOKEN" -H "Accept: application/json" https://api.fastly.com/service/$FASTLY_SERVICE_ID/purge_all
before_deploy
0.01s$ if [ -z "$BEFORE_DEPLOY_RAN" ]; then
        npm --no-git-tag-version version $RELEASE_VERSION
        if [ "$TRAVIS_BRANCH" == "master" ]; then export NPM_TAG=stable; fi
        if [[ "$TRAVIS_BRANCH" == hotfix/* ]]; then export NPM_TAG=hotfix; fi # double brackets are important for matching the wildcard
        git config --global user.email $(git log --pretty=format:"%ae" -n1)
        git config --global user.name $(git log --pretty=format:"%an" -n1)
        export BEFORE_DEPLOY_RAN=true
      fi

dpl_1
2.15s$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl
Successfully installed dpl-1.10.12
Parsing documentation for dpl-1.10.12
Done installing documentation for dpl after 0 seconds
1 gem installed
3.21s
dpl.1
Installing deploy dependencies
Successfully installed dpl-script-1.10.12
Parsing documentation for dpl-script-1.10.12
Installing ri documentation for dpl-script-1.10.12
Done installing documentation for dpl-script after 0 seconds
1 gem installed
dpl.2
Preparing deploy
dpl.3
Deploying application
after_deploy
0.41s$ curl -X POST -H "Fastly-Key: $FASTLY_TOKEN" -H "Accept: application/json" https://api.fastly.com/service/$FASTLY_SERVICE_ID/purge_all
Skipping a deployment with the s3 provider because this branch is not permitted: develop
before_deploy
0.01s$ if [ -z "$BEFORE_DEPLOY_RAN" ]; then
        npm --no-git-tag-version version $RELEASE_VERSION
        if [ "$TRAVIS_BRANCH" == "master" ]; then export NPM_TAG=stable; fi
        if [[ "$TRAVIS_BRANCH" == hotfix/* ]]; then export NPM_TAG=hotfix; fi # double brackets are important for matching the wildcard
        git config --global user.email $(git log --pretty=format:"%ae" -n1)
        git config --global user.name $(git log --pretty=format:"%an" -n1)
        export BEFORE_DEPLOY_RAN=true
      fi

dpl_3
2.13s$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl
Successfully installed dpl-1.10.12
Parsing documentation for dpl-1.10.12
Done installing documentation for dpl after 0 seconds
1 gem installed
377.24s
dpl.1
Installing deploy dependencies
dpl.2
Preparing deploy
dpl.3
Deploying application
> scratch-gui@0.1.0-prerelease.20190828174013 deploy /home/travis/build/LLK/scratch-gui
> touch build/.nojekyll && gh-pages -t -d build -m "Build for $(git log --pretty=format:%H -n1)" "-x" "-e" "develop" "-r" "https://[secure]@github.com/LLK/scratch-gui.git"
Published
after_deploy
0.69s$ curl -X POST -H "Fastly-Key: $FASTLY_TOKEN" -H "Accept: application/json" https://api.fastly.com/service/$FASTLY_SERVICE_ID/purge_all
Skipping a deployment with the script provider because a custom condition was not met
after_script
0.11s$ greenkeeper-lockfile-upload
'develop' is not a Greenkeeper branch
Done. Your build exited with 0.
watilde commented 4 years ago

@benjiwheeler How about replacing travis with GitHub Actions?