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

BundleTool.BuildBundle not work when build in batchmode #74

Closed
th3gh0st0110 opened this issue Dec 8, 2020 · 2 comments
Closed

BundleTool.BuildBundle not work when build in batchmode #74

th3gh0st0110 opened this issue Dec 8, 2020 · 2 comments
Assignees

Comments

@th3gh0st0110
Copy link

th3gh0st0110 commented Dec 8, 2020

Hi,

I got problem when build app in batchmode. I used API BundleTool.BuildBundle to build aab, when build it from unity editor it success, but when build in batchmode it return false.
Here is my build log:

`- Processing asset pack 1 of 1...

  • Creating base module...
  • Processing module 1 of 2...
  • Zip file C:\Users\Admin\TeamCity\buildAgent\temp\buildTmp\play-unity-build\ai\ai.zip
  • Processing module 2 of 2...
  • Zip file C:\Users\Admin\TeamCity\buildAgent\temp\buildTmp\play-unity-build\base\base.zip
  • Running bundletool...
  • bundletool failed: Failed to run 'C:\Program Files\Java\jdk1.8.0_251\bin\java.exe -jar "C:\Users\Admin\TeamCity\buildAgent\work\a5acc8d711346ed9\SSAR3\Assets\GooglePlayPlugins\com.google.android.appbundle\Editor\Tools\bundletool-all.jar" build-bundle --overwrite --config="C:\Users\Admin\TeamCity\buildAgent\temp\buildTmp\BundleConfig.json" --modules=C:\Users\Admin\TeamCity\buildAgent\temp\buildTmp\play-unity-build\ai\ai.zip,C:\Users\Admin\TeamCity\buildAgent\temp\buildTmp\play-unity-build\base\base.zip --output="D:/TeamcityBuildArtifacts/Ssar3_TungntAndroidFree/71/ssar3_feature_buildPipeline2_0.7.0.0_17_71_ARMv7.aab" --metadata-file=com.android.tools.build.libraries/dependencies.pb:C:\Users\Admin\TeamCity\buildAgent\temp\buildTmp\play-unity-build\base\source\BUNDLE-METADATA\com.android.tools.build.libraries\dependencies.pb'
  • stdout:
  • stderr:
  • Error: java.nio.file.NoSuchFileException: C:\Users\Admin\TeamCity\buildAgent\temp\buildTmp\ZipBuilder-3490980362137543608.zip.tmp -> D:\TeamcityBuildArtifacts\Ssar3_TungntAndroidFree\71\ssar3_feature_buildPipeline2_0.7.0.0_17_71_ARMv7.aab
  • java.io.UncheckedIOException: java.nio.file.NoSuchFileException: C:\Users\Admin\TeamCity\buildAgent\temp\buildTmp\ZipBuilder-3490980362137543608.zip.tmp -> D:\TeamcityBuildArtifacts\Ssar3_TungntAndroidFree\71\ssar3_feature_buildPipeline2_0.7.0.0_17_71_ARMv7.aab
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.execute(BuildBundleCommand.java:261)
    at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:71)
    at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:47)
    Caused by: java.nio.file.NoSuchFileException: C:\Users\Admin\TeamCity\buildAgent\temp\buildTmp\ZipBuilder-3490980362137543608.zip.tmp -> D:\TeamcityBuildArtifacts\Ssar3_TungntAndroidFree\71\ssar3_feature_buildPipeline2_0.7.0.0_17_71_ARMv7.aab
    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
    at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
    at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
    at java.nio.file.Files.move(Files.java:1395)
    at com.android.tools.build.bundletool.io.ZipBuilder.writeTo(ZipBuilder.java:107)
    at com.android.tools.build.bundletool.io.AppBundleSerializer.writeToDisk(AppBundleSerializer.java:115)
    at com.android.tools.build.bundletool.commands.BuildBundleCommand.execute(BuildBundleCommand.java:259)
    `
@thanwah thanwah self-assigned this Dec 8, 2020
@thanwah
Copy link
Contributor

thanwah commented Dec 8, 2020

Thanks @th3gh0st0110 for filing this issue.

The issue is happening within our bundletool dependency, and it appears to be this issue: google/bundletool#191

I'll update the plugin's bundletool dependency to 1.4.0 to see if it fixes your issue.

If you'd like to try a workaround, you could create the missing directory with Directory.CreateDirectory() before calling the BundleTool.BuildBundle() command.

@thanwah
Copy link
Contributor

thanwah commented Dec 9, 2020

My commit 05283ee auto-closed this, and the issue should now be fixed at head. Note that this fix is not yet included in a release.

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