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

validator.worker.js.map not found #2146

Closed
rmohta opened this issue May 6, 2020 · 1 comment
Closed

validator.worker.js.map not found #2146

rmohta opened this issue May 6, 2020 · 1 comment
Assignees

Comments

@rmohta
Copy link

rmohta commented May 6, 2020

Q&A (please complete the following information)

  • OS: macOS
  • Browser: Chrome
  • Version: 80
  • Method of installation: swaggerapi/swagger-editor:v3.8.1 docker image
  • Swagger-Editor version: 3.8.1
  • Swagger/OpenAPI version: Swagger 2.0

Content & configuration

Example Swagger/OpenAPI definition:
Does not matter, this is seen in nginx logs

Swagger-Editor configuration options:
Does not matter, this is seen in nginx logs

Describe the bug you're encountering

When we start a container with swaggerapi/swagger-editor:v3.8.1 image, nginx logs show 404 for validator.worker.js.map file.
I have not tested it completely, to determine if there was any loss in functionality.

172.17.0.1 - - [06/May/2020:14:17:55 +0000] "GET / HTTP/1.1" 200 1379 "-" "Some Browser"
172.17.0.1 - - [06/May/2020:14:17:55 +0000] "GET /dist/swagger-editor.css HTTP/1.1" 200 24472 "http://localhost:32774/" "Some Browser"
172.17.0.1 - - [06/May/2020:14:17:55 +0000] "GET /dist/swagger-editor-bundle.js HTTP/1.1" 200 770069 "http://localhost:32774/" "Some Browser"
172.17.0.1 - - [06/May/2020:14:17:55 +0000] "GET /dist/swagger-editor-standalone-preset.js HTTP/1.1" 200 169082 "http://localhost:32774/" "Some Browser"
172.17.0.1 - - [06/May/2020:14:17:55 +0000] "GET /dist/swagger-editor.css.map HTTP/1.1" 200 484400 "-" "Some Browser"
172.17.0.1 - - [06/May/2020:14:17:56 +0000] "GET /dist/swagger-editor-standalone-preset.js.map HTTP/1.1" 200 2661429 "-" "Some Browser"
172.17.0.1 - - [06/May/2020:14:17:56 +0000] "GET /dist/swagger-editor-bundle.js.map HTTP/1.1" 200 8805670 "-" "Some Browser"
172.17.0.1 - - [06/May/2020:14:17:56 +0000] "GET /dist/favicon-32x32.png HTTP/1.1" 200 1643 "http://localhost:32774/" "Some Browser"
2020/05/06 14:17:56 [error] 8#8: *9 open() "/usr/share/nginx/html/validator.worker.js.map" failed (2: No such file or directory), client: 172.17.0.1, server: localhost, request: "GET /validator.worker.js.map HTTP/1.1", host: "localhost:32774"
172.17.0.1 - - [06/May/2020:14:17:56 +0000] "GET /validator.worker.js.map HTTP/1.1" 404 188 "-" "Some Browser"

To reproduce...

Steps to reproduce the behavior:

  1. docker run --rm -P swaggerapi/swagger-editor:v3.8.1
  2. Open browser and point to port mapped to container port 8080
  3. View docker logs
  4. You'll see open() "/usr/share/nginx/html/validator.worker.js.map" failed (2: No such file or directory)

Expected behavior

No "file not found" related error message in docker logs

Screenshots

Additional context or thoughts

This is source map file, so in theory shouldn't be a problem. To fix it, I had copied the file from /usr/share/nginx/html/dist/validator.worker.js.map to /usr/share/nginx/html/validator.worker.js.map

@char0n
Copy link
Member

char0n commented Apr 14, 2022

After merging #2998 and building docker image locally, I can verify that this no longer manifest. It should be away when we release next version of SwaggerEditor.

Explanation:

We bundle validation worker as a BLOB URL directly to main bundle (there is no separate file). We no longer use web worker fallbacks as we expect that everybody who uses SwaggerEditor is already using a browser that supports web workers. We do declare following in our main README file: Swagger Editor works in the latest versions of Chrome, Safari, Firefox, and Edge. so we dont' consider inlining a web worker without fallback a breaking change.

@char0n char0n closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants