Daml-ui-template too big for DABL
- jamesljaworski85OP 1
Continuing the discussion from Make Build:
Hey DAMLer’s.
I am doing some testing with the digital-asset/ daml-ui-template and was hoping to deploy to DABL (I already have an account). I am working from a Windows machine.
@Gary_Verhaegen helped me work through the Makefile steps manually and I was able to run the application on my machine.
I have been able to upload the
.darfile I haven’t been able to get the UI to load to DABL. I get the following error:Workspace upload failed. File too large: ui.zip (limit: 33554432 bytes)
The
.zipfile is 64,001 KB (about twice the size of the maximum file size of 32 MB on DABL). This is just the base case application so any modifications would likely only make the .zip file larger. Taking up most of the space is theNode Modulesfolder.I did the
make deploystep manually, could this make a difference in the size of the file?Has anyone else ran into this before and how did you go about it?
- cocreature 1
You shouldn’t have to deploy the
node_modulesdirectory. If you look at theMakefile, the 2 relevant commands are the following:-
yarn build. This builds and bundles all your UI code in abuilddirectory. This code is standalone, you can just throw the contents of that directory in any static file server to deploy it. -
cd ui && zip -r ../deploy/daml-ui-template.zip buildThis creates a zip file atdeploy/daml-ui-template.zipcontaining the contents ofui/buildand only those.node_modulesis not included here.
The resulting zip file is roughly 1.2MB for me. It sounds like you might have zipped the entire
uidirectory or maybe even the whole project instead of just zippingui/build. -
- jamesljaworski85 1
Hey @cocreature! You are correct. I misinterpreted the Makefile. I thought the entire contents of the
uifolder had to be in the zip.Thanks for explaining what the
yarn buildstep does. I now understand that the build directory contains the contents that I want to upload to DABL.My command line doesn’t allow me to
zipso I have to do it manually. Am I right to just send the contents of thebuildfolder to a zip file calleddaml-ui-template.zip? I read in that DABL docs that the folder must contain anindex.htmlso it appears to be correct.When I do upload this in DABL, I get the following error:
`
Workspace upload failed. Unexpected error in upload API request
`
Are you familiar with this error? - cocreature 1
The zip file produces by the makefile looks as follows:
Archive: deploy/daml-ui-template.zip Length Date Time Name --------- ---------- ----- ---- 0 12-12-2020 07:47 build/ 32038 12-12-2020 07:47 build/favicon.ico 308 12-12-2020 07:47 build/manifest.json 2290 12-12-2020 07:47 build/index.html 665 12-12-2020 07:47 build/precache-manifest.1d296f045941182ded597941339f4313.js 1181 12-12-2020 07:47 build/service-worker.js 913 12-12-2020 07:47 build/asset-manifest.json 0 12-12-2020 07:47 build/static/ 0 12-12-2020 07:47 build/static/js/ 19336 12-12-2020 07:47 build/static/js/main.a9c069ad.chunk.js 871095 12-12-2020 07:47 build/static/js/2.4b3955c7.chunk.js 1585 12-12-2020 07:47 build/static/js/runtime-main.ffdbe1d8.js 1423 12-12-2020 07:47 build/static/js/2.4b3955c7.chunk.js.LICENSE.txt 8298 12-12-2020 07:47 build/static/js/runtime-main.ffdbe1d8.js.map 55234 12-12-2020 07:47 build/static/js/main.a9c069ad.chunk.js.map 3370085 12-12-2020 07:47 build/static/js/2.4b3955c7.chunk.js.map 0 12-12-2020 07:47 build/static/media/ 1846 12-12-2020 07:47 build/static/media/logo.06c81d21.svg --------- ------- 4366297 18 filesNote that everything is under the
builddirectory. I’m not quite sure what the requirements on DABL’s side are but I’d try to replicate that directory structure as a first step. - jamesljaworski85 1
Hmm. It looks like the structure appears to be the same…
build/ build/favicon.ico build/manifest.json build/index.html build/precache-manifest.79cd6d3732a85d985a6dde1d926cf2ea.js build/service-worker.js build/asset-manifest.json build/static/ build/static/js/ build/static/js/main.419a5d6f.chunk.js build/static/js/2.0c660beb.chunk.js build/static/js/runtime-main.ffdbe1d8.js build/static/js/2.0c660beb.chunk.js.LICENSE.txt build/static/js/runtime-main.ffdbe1d8.js.map build/static/js/2.0c660beb.chunk.js.map build/static/js/2.419a5d6f.chunk.js.map build/static/media/ build/static/media/logo.06c81d21.svgThe only other thing I could think of is maybe something to do with the SDK version? In the top left of the DABL Workspace it says SDK 1.7.0. The
daml-ui-templateis currently 1.5.0. However I looked at the digital-asset/ dablchat example and the SDK is 1.4.0 so it doesn’t seem like that should be an issue. - cocreature 1
I just tried this myself and I’m failing to reproduce this. I’ll reach out to the DABL team.
- Gary_Verhaegen 1
Note that the DABL team is mostly US-based so you may have to wait a couple hours to hear from them.
- jamesljaworski85 1
Thanks, guys! I’m stateside too. Just having my first cup of
! - Michael_Schaeffer
@jamesljaworski85 I’m in DABL engineering… one question… have you tried uploading the same file two times? We’re working through a potential issue at the moment whereby uploading the file twice (a couple minutes apart) might be a workaround.
(There is also validation in place to ensure the format of the ZIP file is correct, but from the directory listing you’ve shown, your file should pass that validation check.)
- jamesljaworski85
Good morning, @Michael_Schaeffer. I retried using the multiple times approach and it wasn’t able to upload.
The first time, I get two pop-up notifications in the upper right corner. The first is green and says upload successful and the second follows in a red almost instantly afterwards:
When I try the second/third time (a couple minutes apart), I don’t get any notification response and the file doesn’t show up in deployments.
- Michael_Schaeffer 2
Good morning, @jamesljaworski85,
I’ve been able to reproduce what you’re seeing myself, exactly. However, it only happens when I try to upload a ZIP file that does not have the top level directory. Can you confirm the directory listing of the ZIP file?
To use @cocreature’s example, every file is in a top level directory
build/, which needs to be there for the file to be considered valid. We are working on improving the messaging around this condition, as I write this.
Thanks,
Mike - jamesljaworski85
Hey, Michael. That’s correct. I was not using a top-level directory from
build/. - jamesljaworski85 3
Thanks for your help, @Michael_Schaeffer! I was able to get it up and running now. I didn’t realize it was as simple as zipping the
buildfolder instead of the contents of thebuildfolder
.

