Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Example has blank output #185

Open
gnzlbg opened this issue Oct 13, 2017 · 10 comments
Open

Example has blank output #185

gnzlbg opened this issue Oct 13, 2017 · 10 comments

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Oct 13, 2017

The readme says:

Currently, it only builds the given example. Do it as follow:

`cargo run --release -- --manifest-path=example/Cargo.toml`
Then open a web browser and open "rustdoc/example/target/doc/index.html".

When I do that, the website is completely blank. This is the output:

 Generating save analysis data: Done
  Loading save analysis data: Done
  Generating JSON: Done
  Copying Assets: Done
@gnzlbg
Copy link
Contributor Author

gnzlbg commented Oct 13, 2017

Chrome dev-tools says:

Subresource Integrity: The resource 'file:////.../rustdoc/example/target/doc/assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css' has an integrity attribute, but the resource requires the request to be CORS enabled to check the integrity, and it is not. The resource has been blocked because the integrity cannot be enforced.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Oct 13, 2017

So I've found the culprit, it is not a static site... I need to run a webserver to open it:

$ python -m SimpleHTTPServer PORT

and then opening http://localhost:PORT did the trick.

@steveklabnik
Copy link
Owner

It should work without needing that. We should fix the integrity issue.

@projektir
Copy link
Contributor

Hmm, I had it working by running npm install and npm start in the frontend folder, then it puts it on http://localhost:4200/example.

@mgattozzi
Copy link
Contributor

You shouldn't have to run npm start is the problem. npm start starts a server like SimpleHTTPServer to serve the docs. You should just navigate to it like rustdoc today. I swear we had another issue for this but I can't seem to find it.

@ehuss
Copy link

ehuss commented Nov 3, 2017

I'm not sure it's possible for this to work with file urls in Chrome. Running Chrome with --allow-file-access-from-files seems to allow it to work.

@steveklabnik
Copy link
Owner

ah, bummer. hmmm

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 4, 2017

Is this an intrinsic problem with ember ?

@steveklabnik
Copy link
Owner

No, with Chrome not letting you ajax in a file://.

@ehuss
Copy link

ehuss commented Nov 4, 2017

It's not just the XMLHttpRequest. The Subresource Integrity checks also fail, preventing any of the css/js from loading. I tried messing with setting crossorigin, but I couldn't find a way to get it to work (without command-line options).

I think it means commands like cargo doc --open would no longer work with Chrome. I'm trying to think of a good workaround, but I don't have any ideas.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants