-
Notifications
You must be signed in to change notification settings - Fork 63
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
feat: add Helia Angular example #309
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried running this locally and the page ends up crashing after a few seconds.. the only errors I see are webtransport errors.. I will have to dive into this a bit further
@paschal533 thanks so much for opening this - do you have some time to address @SgtPooki's review comments? |
I totally forgot 🤦. Let me work on it right away. Thank you so much. |
@SgtPooki Thank you for taking the time to review this pull request and providing such insightful suggestions. The necessary changes have been made accordingly. |
I tested this locally again and tried making some improvements, but no matter what I do Chrome will crash the page for some reason. I am thinking it's the WebTransport errors because it doesn't happen in FF |
Hi @SgtPooki, Do you have any idea how we can fix the Browser crashing issue? I tried everything I could but Chrome kept crashing. |
I think we need to see if disabling webtransport fixes the issue in chrome? Angular seems to be doing something odd with network errors, instead of handling them gracefully, and only chromium based browsers throws those errors |
Hi @SgtPooki, Thanks for the suggestion! I'll test disabling WebTransport to see if it resolves the issue in Chrome. I’ll also look into how Angular is handling network errors and try to identify why Chromium-based browsers are throwing these exceptions. If you have any specific steps or resources for debugging this further, I'd appreciate the pointers. I'll update you once I have some results from the testing. Thanks again for the help! |
I really wish I did.. I tried stepping through and tracing and couldn't get the app to be accessible in the browser at any point after it crashes. The only other thing I tried doing was building a static front-end so the I think if we can pull out any of the server side stuff here and just use Angular as a front-end library (can Angular even do that? How do you build a fully encapsulated static front-end site with Angular?), it might give us some more insight. I also tried completely removing the Helia instance from all Angular references to see if that helped, and it did not. |
Hi @SgtPooki , Thanks for sharing your experience! It’s helpful to know you tried building a static front-end and removing Helia references, but the issue persisted. Regarding your question, yes, Angular can be used as a fully encapsulated static front-end framework. The Here’s what I plan to test next:
I’ll let you know what I find. If there’s anything specific you’d like me to test, please let me know! |
Hi @SgtPooki , I managed to resolve the browser crashing issue by isolating Helia in a minimal Angular app. Here’s what I did:
It seems the issue may be related to how Helia interacts with more complex Angular projects or specific configurations. Let me know your thoughts! |
I feel like an example showing how to get it working with server side components would be good but if we have a simple example with just front-end angular working that's a great starting point. Maybe we can change the name to frontend only? ...or, since we confirmed its something with the server side parts of angular, can we encapsulate the Helia component enough to tell the angular build system to only do the helia stuff on the frontend? In react and nextjs this would just be a simple |
I agree, having an example that shows how to get it working with server side components would be helpful. Encapsulating Helia to run only on the front-end within Angular is a great idea. While Angular doesn’t have a
I'll create an updated version of the example to demonstrate this approach and test it in a more complex Angular setup. I'll also explore encapsulating Helia in a service or module to make it reusable and easier to integrate with server-side rendering or Angular Universal. |
Hi @SgtPooki, I wanted to let you know that everything is working now! 🎉 It took me a few days of trial and error to figure it out, but I finally got it sorted. I learned a lot along the way, and honestly, I enjoyed the journey—it was a great challenge! I’ve pushed the code for review. Let me know if there’s anything else I can improve or adjust. Thanks for all your guidance and support throughout this process! 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paschal533 I've confirmed this is working in chrome now (FF still works). Great work!!
There are still a few unresolved issues from previous comments:
- .editorconfig not idiomatic in these examples (please delete it from the git repo
git rm --cached .editorconfig
) - styling of the page should more closely match styling of other examples
Hi @SgtPooki |
@paschal533 I see that the nextjs example is using a pretty standard nextjs app template. I am good with leaving this and will chat about this in Helia WG today |
Alright, thanks @SgtPooki. Please, can you help me with the link to Helia WG today. I can't seem to find it on my calendar. :) |
you can find all Helia WG meetings on the IPFS calendar here: https://lu.ma/ipfs Today's meeting is at https://lu.ma/8yw69b08 |
Thank you. |
Hi @SgtPooki, I have updated the ci.yml file. |
I added how to implement helia in an Angular project