I am using bob to build bundle. After i add google analytics, build is broken.
C:\Users\d954mas\odyssey-1984>java -jar ../bob(1).jar -build-report-html bundles/report.html --archive resolve distclean build
Infinity%Exception in thread "main" java.io.IOException: Server returned HTTP response code: 400 for URL: https://github.com/britzl/defold-googleanalytics/archive/master.zip
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at com.dynamo.bob.Project.resolveLibUrls(Project.java:890)
at com.dynamo.bob.Bob.createProject(Bob.java:240)
at com.dynamo.bob.Bob.main(Bob.java:275)
Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: https://github.com/britzl/defold-googleanalytics/archive/master.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
at com.dynamo.bob.Project.resolveLibUrls(Project.java:870)
... 2 more
Previous problem was with https. If i use http instead of https file loading work.
But i have another problem.
java -jar ../bob(1).jar -build-report-html bundles/report.html --archive resolve distclean build
Infinity%Exception in thread "main" com.dynamo.bob.LibraryException: The file obtained from http://github.com/britzl/defold-googleanalytics/archive/master.zip is not a valid zip file
at com.dynamo.bob.Project.resolveLibUrls(Project.java:898)
at com.dynamo.bob.Bob.createProject(Bob.java:240)
at com.dynamo.bob.Bob.main(Bob.java:275)
Caused by: java.util.zip.ZipException: zip file is empty
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at com.dynamo.bob.Project.resolveLibUrls(Project.java:894)
... 2 more
Ok, so you should use https, but that in itself will not be enough. It seems as if you also have to pass in --auth and --email even though they aren’t needed for resolving dependencies from GitHub. You can provide bogus values if you like:
What about zero size file from github, when i use http? The problem is that github return 301 http code(file moved). Or when i add auth, everything will be ok?
bob doesn’t handle redirects, but if you look at the redirect when using http (using curl or similar) it actually redirects to the same url but with https instead. So if you use https there will be no redirect.
I was having this issue. Using the -auth -email trick worked… until just now.
Resolving
[java] Exception in thread "main" java.io.IOException: Server returned HTTP response code: 500 for URL: https://github.com/britzl/defold-input/archive/master.zip
I am using the latest version of bob 1.2.132 2018-06-29 16:13:36 (0941035)
Yes, we noticed a hickup on our server with a similar message (500 from github) about the same time, and by looking at the GitHub status page, we can see that they indeed had some issues then.