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

Unable to run examples with trunk version 0.5.0 #1587

Closed
1 of 3 tasks
seanybaggins opened this issue Sep 23, 2020 · 14 comments · Fixed by trunk-rs/trunk#56
Closed
1 of 3 tasks

Unable to run examples with trunk version 0.5.0 #1587

seanybaggins opened this issue Sep 23, 2020 · 14 comments · Fixed by trunk-rs/trunk#56
Labels
A-examples Area: The examples bug

Comments

@seanybaggins
Copy link

Problem
Web pages are plank when serving examples with trunk version 0.5.0.

Running trunk version 0.4.0 seams to resolve this issue.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Install trunk version 0.5.0 (latest version as of writing this issue). cargo install trunk --version 0.5.0
  2. Go to the examples/game_of_life directory (I chose the game of life example, but any example should be able to reproduce the same error).
  3. Serve the example trunk serve --release
  4. Go to http://127.0.0.1:8080/

Expected behavior
To see the following webpage.
image

Actual behavior
A blank, white webpage.

Environment:

  • Yew version: master
  • Rust version: 1.46.0 stable
  • Build tool, if relevant: trunk
  • Browser and version, if relevant: Mozilla Firefox 80.0.1

Questionnaire

  • I'm interested in fixing this myself but don't know where to start
  • I would like to fix and I have a solution
  • I don't have time to fix this right now, but maybe later
@thedodd
Copy link
Contributor

thedodd commented Sep 23, 2020

@seanybaggins I'll take a look right now.

@thedodd
Copy link
Contributor

thedodd commented Sep 23, 2020

@seanybaggins are you getting any terminal output from Trunk?

@siku2 siku2 added the A-examples Area: The examples label Sep 23, 2020
@siku2
Copy link
Member

siku2 commented Sep 23, 2020

I can't believe it literally only took a day to break. I thought I could finally take a break from the examples 😆

@seanybaggins
Copy link
Author

Yes.

  server running at http://127.0.0.1:8080/
  build completed successfully

@thedodd
Copy link
Contributor

thedodd commented Sep 23, 2020

Looks like a regression in Trunk related to serving the index.html by default. Trunk is returning a 404. I believe I've already got the fix in place. Standby.

@thedodd
Copy link
Contributor

thedodd commented Sep 23, 2020

Yup, I put the middleware after the handler itself ☠️ ... just putting the middleware first fixes the issue. A stupid regression. Will have to add some regression tests for this in Trunk.

@thedodd
Copy link
Contributor

thedodd commented Sep 23, 2020

@seanybaggins I'll push a 0.5.1 trunk release right now.

thedodd added a commit to trunk-rs/trunk that referenced this issue Sep 23, 2020
This fixes a regression in the 0.5.0 release where the index.html file
was not being served as a fallback.

closes #55
closes yewstack/yew#1587
@thedodd
Copy link
Contributor

thedodd commented Sep 23, 2020

Ok, 0.5.1 release is being built right now. I tested it on this example, and it fixes the issue. Thanks for the report @seanybaggins!

@thedodd
Copy link
Contributor

thedodd commented Sep 23, 2020

@siku2 this makes me wonder if we should setup some more in-depth regression tests in trunk to clone this repo & spawn and test builds for each of the examples. Thoughts?

@seanybaggins
Copy link
Author

@thedodd Thanks for the quick fix.

@thedodd
Copy link
Contributor

thedodd commented Sep 23, 2020

@seanybaggins ok, you should be good to go now. Let me know if you run into any other issues.

@seanybaggins
Copy link
Author

@thedodd Are you okay if the ticket closes or would you like to continue discussion with @siku2?

@thedodd
Copy link
Contributor

thedodd commented Sep 23, 2020

@seanybaggins you're good. I'll chat with Siku on discord and we can coordinate regression/example tests in the Trunk repo. Thanks!

@siku2
Copy link
Member

siku2 commented Sep 23, 2020

Thanks a ton for taking care of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-examples Area: The examples bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants