Continuing the discussion from Make Build:
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
.dar file 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)
.zip file 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 the
Node Modules folder.
I did the
make deploy step 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?
You shouldn’t have to deploy the
node_modules directory. If you look at the
Makefile, the 2 relevant commands are the following:
yarn build. This builds and bundles all your UI code in a
build directory. 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 build This creates a zip file at
deploy/daml-ui-template.zip containing the contents of
ui/build and only those.
node_modules is not included here.
The resulting zip file is roughly 1.2MB for me. It sounds like you might have zipped the entire
ui directory or maybe even the whole project instead of just zipping
Hey @cocreature! You are correct. I misinterpreted the Makefile. I thought the entire contents of the
ui folder had to be in the zip.
Thanks for explaining what the
yarn build step 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
zip so I have to do it manually. Am I right to just send the contents of the
build folder to a zip file called
daml-ui-template.zip? I read in that DABL docs that the folder must contain an
index.html so 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?
The zip file produces by the makefile looks as follows:
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 files
Note that everything is under the
build directory. 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.
Hmm. It looks like the structure appears to be the same…
The 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-template is 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.
I just tried this myself and I’m failing to reproduce this. I’ll reach out to the DABL team.
Note that the DABL team is mostly US-based so you may have to wait a couple hours to hear from them.
Thanks, guys! I’m stateside too. Just having my first cup of !
@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.)
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.
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.
Hey, Michael. That’s correct. I was not using a top-level directory from
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
build folder instead of the contents of the
build folder .