$ bench build An Error occurred while downloading assets

$ bench build
An Error occurred while downloading assets…

In ERPNext Version 13 while updates.

1 Like

+1 me too

Facing the same error too
Migrating jaydonline.co.ke
Updating DocTypes for frappe : [========================================] 100%
Updating DocTypes for erpnext : [========================================] 100%
Updating Dashboard for frappe
Updating Dashboard for erpnext
Updating customizations for Address
Updating customizations for Contact
Building search index for jaydonline.co.ke
Compiling Python files…
$ bench build
*

An Error occurred while downloading assets…

yarn run v1.21.1
$ FRAPPE_ENV=production node rollup/build.js
Production mode
:heavy_check_mark: Built js/moment-bundle.min.js
:heavy_check_mark: Built js/libs.min.js

My version.

 ERPNext: v13.0.0-beta.5
 Frappe Framework: v13.0.0-beta.6

I am also facing the same.

Since Version 13 (via #11436), assets can be downloaded if they are available on GitHub releases or http://assets.frappeframework.com. This means Frappe tries downloading assets first to avoid having to build them itself. These errors come up if you’re running on an untagged commit of a stable branch, ie only version-13-beta at the moment, or a custom branch (not develop).

There’s another scenario where your clones might’ve in the middle of releases, or that commits are added over the stable branches without releases that can cause this error to come up. However, this is a harmless error and just means your server will have to build its own assets instead of having to depend on pre-built bundles.

5 Likes

Hi,
did you get any solution for this?
thanks.

Hi @gavindsouza, hope you’re doing well.

As mentioned by you, Frappe assets are being tried to download from https://assets.frappeframework.com/.

Unfortunately, I never witnessed as intended to work, system never able to download them either from Github releases or mentioned site. Often notice same, “An Error occurred while downloading assets”. When I tried visit this subdomain, I found SSL_ERROR_BAD_CERT_DOMAIN probably due to HSTS security policy or SSL Certificate issue!

Is this a potential issue that isn’t allowing assets to download or due to the release branch got updated from develop to version-13 or version-13-pre-release?

assets.frappeframework.com does not have HTTPS support. It’s a public S3 bucket with a custom domain[1]. Maybe you could try by adding verify=False on line 32 (develop) in the download_file function in build.py.

As for stable branches that have tags (releases), the assets should be downloaded from GitHub directly.

[1] https://www.scaleway.com/en/docs/s3-customize-bucket-domain/

Tried. Still getting the error. Thanks anyway

Any advance on this issue?

Relevant GitHub issue: bench init frappe-bench : error occurred while downloading assets · Issue #11684 · frappe/frappe · GitHub

I’ve raised the following PR to show more descriptive errors. In case assets aren’t available for a given commit or release, a message in yellow font will be shown and will continue to build assets normally.

https://github.com/frappe/frappe/pull/14271

In case of network, writing to disk, or extraction errors, the respective error will be shown in red. In case anyone faces errors like that, we can investigate and handle them if they fit in the scope of the project.