How to get solve git client issue on Android Studio? - android

Sometimes the Git pull doesn't work in android studio.
It gives this error.
Update failed
Invocation failed Unexpected end of file from server
java.lang.RuntimeException: Invocation failed Unexpected end of file from server
at git4idea.GitAppUtil.sendXmlRequest(GitAppUtil.java:30)
at git4idea.http.GitAskPassApp.main(GitAskPassApp.java:58)
Caused by: java.net.SocketException: Unexpected end of file from server
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:866)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:863)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1615)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
at org.apache.xmlrpc.DefaultXmlRpcTransport.sendXmlRpc(DefaultXmlRpcTransport.java:87)
at org.apache.... (show balloon)
But if I try it will terminal, then it works always.
How to solve this error?

Related

Problems with uploading to github

When trying to make a push, this error is returned. And even on a new empty project. The authorization was re-passed with a token. What could be the problem?
Invocation failed Unexpected end of file from server
java.lang.RuntimeException: Invocation failed Unexpected end of file from server
at git4idea.GitAppUtil.sendXmlRequest(GitAppUtil.java:30)
at git4idea.http.GitAskPassApp.main(GitAskPassApp.java:58)
Caused by: java.net.SocketException: Unexpected end of file from server
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:866)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:863)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1615)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
at org.apache.xmlrpc.DefaultXmlRpcTransport.sendXmlRpc(DefaultXmlRpcTransport.java:87)
at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
at git4idea.GitAppUtil.sendXmlRequest(GitAppUtil.java:27)
... 1 more
error: unable to read askpass response from '/Users/gukov/Library/Caches/Google/AndroidStudio2021.2/tmp/intellij-git-askpass-local.sh'
fatal: could not read Username for 'https://github.com': Device not configured
Enable Use credential helper
Preference -> Git -> Check Use credential helper if not checked

Github Push failed: Failed with error: RPC failed; curl 56 LibreSSL SSL_read: error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3

When i am Trying to push my android project to GitHub i got this error
Failed with error: RPC failed; curl 56 LibreSSL SSL_read:
error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record
mac, errno 0 The remote end hung up unexpectedly The remote end hung
up unexpectedly
It can be caused by large files in your repo. Github has 100 MB limit for a single file in a repo. You might want to check it by using git lfs migrate info.
I've had the same issue but this particular error was intermittent. I occasionally have seen "error: GH001: Large files detected. You may want to try Git Large File Storage". Also when I switched to SSH for remote origin instead of HTTPS it gave me broken pipe error message.
I already used LFS but my .gitattributes missed some large files so I've updated it and run git lfs migrate import --include="*.fileextension" then pushed to github without an error. See https://help.github.com/articles/moving-a-file-in-your-repository-to-git-large-file-storage/.

Can't compile React Native Android APK, fails on bundleReleaseJsAndAssets/metro-bundler

I am getting the following errors compiling on Android, either from the command line or via Android Studio:
* Exception is:
org.gradle.api.UncheckedIOException: Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check
Caused by: java.io.FileNotFoundException: /Users/mikem/react/myapp/metro-bundler-symbolicate117923-49160-k3nnyf.htls935wmi.sock (Operation not supported on socket)
I have cleared out node_module and reset the caches, manually generated the bundle but this error continues.
Any help would be appreciated.
In case anybody else runs into this - the link metro-bundler-symbolicate117923-49160-k3nnyf.htls935wmi.sock did exist in that directory but had a root owner (perhaps could have been caused when I was trying to fix other issues). Deleting the link fixed the problem.

Maximo Anywhere WorkManager build failed

I am try to build android apps but while creating apps my build failed with following errors.
D:\ibm\AnywhereWorkManager\build.xml:87: The following error occurred
while executing this line:
D:\ibm\AnywhereWorkManager\anywhere-apps-builder.xml:720: The
following error occurred while executing this line:
D:\ibm\AnywhereWorkManager\anywhere-apps-builder.xml:716: Failed
building application:
com.worklight.builder.exception.WorklightBuildException:
java.io.IOException: Unable to delete directory
D:\ibm\AnywhereWorkManager\apps\WorkApproval\android\native\assets\www\default\dojo\cldr\nls\zh-hans-mo.
at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
I know this answer might seem obvious, but if you have any of the files mentioned in the failure (D:\ibm\AnywhereWorkManager\apps\WorkApproval\android\native\assets\www\default\dojo\cldr\nls\zh-hans-mo)
open ( commandline, eclipse, other editor), this will cause the issue.

Android Studio 0.8.7: Error:Cause: error in opening zip file

I'm attempting to import a new gradle Android project with AS 0.8.6 (have also tried 0.8.7). When importing I get the following error
Error:Cause: error in opening zip file
From my research, this is very likely a problem with downloading the gradle wrapper.
I've tried deleting the ~/.gradle folder per the suggestion of another post on SO (https://stackoverflow.com/a/23839694/413254). Upon restart the same thing happens.
If I try to run a ./gradlew clean, I get the following error:
Downloading http://services.gradle.org/distributions/gradle-1.12-all.zip
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Invalid Http response
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.io.IOException: Invalid Http response
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1342)
at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
at org.gradle.wrapper.Download.download(Download.java:45)
at org.gradle.wrapper.Install$1.call(Install.java:60)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
... 3 more
Downloading manually (from a browser) via the url in my gradle/wrapper/gradle-wrapper.properties file doesn't give me any problems.
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
EDIT:
I also see the following when doing a ./gradlew clean after a failed attempt to download
Unzipping /Users/user/.gradle/wrapper/dists/gradle-1.12-all/2apkk7d25miauqf1pdjp1bm0uo/gradle-1.12-all.zip to /Users/user/.gradle/wrapper/dists/gradle-1.12-all/2apkk7d25miauqf1pdjp1bm0uo
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.zip.ZipFile.<init>(ZipFile.java:159)
at org.gradle.wrapper.Install.unzip(Install.java:160)
at org.gradle.wrapper.Install.access$400(Install.java:29)
at org.gradle.wrapper.Install$1.call(Install.java:70)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
... 3 more
I'm not sure it's of relevance or not, but there's a gradle-1.12-all.zip.lck file in the same directory with the gradle-1.12-all.zip.
Attempting to unzip the zip results in a cpgz file... which turns back into a zip. According to http://osxdaily.com/2013/02/13/open-zip-cpgz-file/, that's generally an indication of a corrupt download.
I changed the distributionUrl in the gradle-wrapper.properties file to the following (note the https instead of plain old http:
distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-all.zip
and it worked for me. I'd imagine this is a security issue... not sure what's preventing it though. Would still love if somebody had an explanation for why this is.

Categories

Resources