a-b-street / a-b-street/abstreet

Improve Cloudfront config

Đang mở
#1,081 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
8.2k
Fork
380
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Broken: http://play.abstreet.org/0.3.43/santa.html
Working: http://abstreet.s3-website.us-east-2.amazonaws.com/0.3.43/santa.html

```
Started loading WASM [santa.bundle.js:83:21](http://play.abstreet.org/0.3.43/santa/santa.bundle.js)
19:26:51.623 state change: loading -> error [santa.bundle.js:166:17](http://play.abstreet.org/0.3.43/santa/santa.bundle.js)
19:26:51.638 Assertion failed: not yet loaded [santa.bundle.js:129:21](http://play.abstreet.org/0.3.43/santa/santa.bundle.js)
19:26:51.639 state change: error -> starting [santa.bundle.js:166:17](http://play.abstreet.org/0.3.43/santa/santa.bundle.js)
19:26:51.639 running app with assetsBaseURL: ./data, assetsAreGzipped: true [santa.bundle.js:132:25](http://play.abstreet.org/0.3.43/santa/santa.bundle.js)
19:26:51.640 state change: starting -> error [santa.bundle.js:166:17](http://play.abstreet.org/0.3.43/santa/santa.bundle.js)
19:26:51.660 Uncaught (in promise) TypeError: wasm is undefined
```

The network tab doesn't even show a .wasm file being loaded:
![Screenshot from 2023-04-20 19-31-05](https://user-images.githubusercontent.com/1664407/233456126-20761203-03c8-4e4d-b55c-c2c735af706f.png)

This appears to have quietly broken a week or two ago, despite there being no recent changes anywhere (S3 or Cloudfront activity generally). I invalidated the entire Cloudfront cache to be safe, but no effect.

IIUC, it looks like Cloudfront stopped returning `Content-Length` headers? We try to grab that before streaming data back:
https://github.com/a-b-street/abstreet/blob/4314a43e777f26c040a20bd6022cb57be00b3389/web/src/widgetry.ts#L121

@michaelkirk if you happen to have any ideas what could've broken, I'd welcome some help! But no pressure, I'm comfortable enough in TS to figure this out now. :)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.