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

Build failed with an exception. #11

Closed
canewsin opened this issue Apr 4, 2020 · 13 comments
Closed

Build failed with an exception. #11

canewsin opened this issue Apr 4, 2020 · 13 comments

Comments

@canewsin
Copy link

canewsin commented Apr 4, 2020

> Task :app:uploadLocallyDynamicBundleDebug FAILED
Failed to upload bundle, make sure the server is running and is reachable at http://192.168.42.170:57202/, reason:
Software caused connection abort: socket write error
         *********************************************************
WARNING: This version of flutter_webview_plugin will break your Android build if it or its dependencies aren't compatible with AndroidX.
         See https://goo.gl/CP92wY for more information on the problem and how to fix it.
         This warning prints for all Android build failures. The real root cause of the error may be unrelated.
         *********************************************************

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:uploadLocallyDynamicBundleDebug'.
> java.net.SocketException: Software caused connection abort: socket write error

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 22s
378 actionable tasks: 11 executed, 367 up-to-date

@jeppeman
Copy link
Owner

jeppeman commented Apr 4, 2020

What does it say in the server log? Could be that the bundle is too large

@canewsin
Copy link
Author

canewsin commented Apr 4, 2020

bundle size is 280 MB +

@jeppeman
Copy link
Owner

jeppeman commented Apr 4, 2020

Damn, that's huge. I believe that might be the issue - do you think you could make the bundle that large in the example project you posted in order for me to investigate some more?

@canewsin
Copy link
Author

canewsin commented Apr 4, 2020

well, I will try it.

@canewsin
Copy link
Author

canewsin commented Apr 4, 2020

https://github.com/canewsin/dynamic_feature_assets
repo updates it will has 250MB debug build size

@canewsin
Copy link
Author

canewsin commented Apr 4, 2020

also another thing is save .aab files to default build dir in my case it is project/build but currently it is project/android/build, this is conflicting with .gitignore

@jeppeman
Copy link
Owner

jeppeman commented Apr 4, 2020

Great, thanks. I will have a look. As for the location it is in the root of the actual android project, which makes sense because it is there the plugin actually operates. I suppose a configuration option could be added where you could chose yourself where the files should be stored.
But in the meantime I think it is easier if you just add a /build entry to the .gitignore file of your android folder

@jeppeman
Copy link
Owner

jeppeman commented Apr 4, 2020

Tried it now, was not able to reproduce unfortunately

@jeppeman
Copy link
Owner

jeppeman commented Apr 4, 2020

2020-04-04 12:14:05: <-- POST http://192.168.86.39:37973/upload
2020-04-04 12:14:05: Request-IP: 192.168.86.39
2020-04-04 12:14:05: Authorization: Basic NDI5NjdlODJiNzI4NGE4M2FlZDc1ZWRiMDk3M2NkZWE6YWIwNmQ3OGI3ZDA3NDBkMThkYTcxOTkyMGUzZTk5OWQ
2020-04-04 12:14:05: Connection: keep-alive
2020-04-04 12:14:05: User-Agent: Apache-HttpClient/4.5.6 (Java/1.8.0_212-release)
2020-04-04 12:14:05: Host: 192.168.86.39:37973
2020-04-04 12:14:05: Accept-Encoding: gzip,deflate
2020-04-04 12:14:05: Content-Length: 265666669
2020-04-04 12:14:05: Content-Type: multipart/form-data; boundary=uT4rofa0mYkKfX47JhFkwHaCLXpKxPui
2020-04-04 12:15:05: --> 200 POST http://192.168.86.39:37973/upload

@canewsin
Copy link
Author

canewsin commented Apr 4, 2020

I think that is Size issue, I added fake module to replicate size issue
https://github.com/canewsin/dynamic_feature_assets/tree/fake-module
see this branch to replicate the issue, and regarding build folder, I think there is a API to retrieve Project Default build folder, for now I can add it to .gitignore but for custom projects there are custom build folders via gradle config for eg : flutter projects, you should use project build folder to host those files.

@jeppeman
Copy link
Owner

jeppeman commented Apr 4, 2020

Thanks, I'll check it out!
That is what is being done (saving to the build folder of the project). When you build the android project, do you open that subproject in Android Studio as well?

@jeppeman
Copy link
Owner

jeppeman commented Apr 4, 2020

Ok, found the issue - there is a fix incoming. In the meantime you can increase the heap space in AS

@jeppeman
Copy link
Owner

jeppeman commented Apr 6, 2020

Fixed in latest AS plugin version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants