Internal server error when using QWIK API

Hi team!

I got interested in the new QWIK API and decided to give it a shot as it seems to have a big potential to improve performance.
I ran into some issues that are worth reporting. For several pages, the API returns a 500 error, while for other pages it is working fine. The only explanation I have so far is that those pages contain a symbol that fetches data from an endpoint.

Any help is appreciated.
Best,
Vincent

Working API call
https://cdn.builder.io/api/v1/qwik/blog-page?userAttributes.urlPath=/worth-the-hype-fenty-beauty-lip-cream-lip-gloss-review

Failing API calls
https://cdn.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/
https://cdn.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/category/fashion

P.S. Happy to DM my public key if needed.

Hi Vincent,

Thanks for reaching out. For me all of the URLs fail with Error: organization is missing. You need to append &apiKey= YOUR_API_KEY. Since you said that one URL used to work I assume the above is cut&paste error. Once you fix the URLs I am happy to look at it.

– Misko

Thanks for the repro instructions, should have a resolution for you soon.

I have looked into it, and it will require a more complex fix. We will probably get back to it early next year.

Awesome, thanks for getting back to me.
Would you know what is causing it and if there would be a way around it in the mean time?

Appreciate the help, thanks,
Vincent

Still working on this, should have something soon. (Sorry holidays got in the way)

Thanks for the update Misko, no worries, holidays are important!

Vincent

Hi @vperrin ,

Thank you for your patience. I think we were able to fix all of the issues. You can see it working here: https://qa.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/category/fashion&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML

As you can see this is on qa.builder.io. We would like you to give it a spin and let us know if there are any more issues before we push it to production.

– Misko

Hi @Misko ,

Thanks for the update, much appreciated.
That page seems to work indeed!

I have other pages that seem not to be working (for example the homepage with urlPath=/), I presume that is because it’s on your QA environment?

Thanks,
Vincent

That should work so let me investigate next week.

Fixed: https://qa.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=/&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML But the content looks duplicated. Is that right? If not can you point me to a content URL that shows it rendered as you want it.

Hi @Misko ,
Thanks for getting back to me.
The end result should be like https://www.sachini.co.uk ( the width of the page is slightly different as there is max width in nextjs)
I have the impression that 2 things are off:

  • The first image is a symbol and should have text and another image on top of it, see the following fiddle
    Builder.io: Drag and drop page builder and CMS
  • This page consist of two symbols which repeat themselves, but with a different offset in order for each symbol to show different posts. When building that page in the builder, I do notice indeed that the content is duplicated there as well. The input field offset I presume is loaded client side, while that field is used to adjust and URL to load the posts serverside (the fetch is within a Builder.isServer). Server side those input fields don’t exist when editing the page, so the default value is used for each of them, hence they appear to repeat each other.
    Using the content API or html API, each of those symbols shows a different post, as you can see on the website (https://www.sachini.co.uk)

Please let me know if you have more questions.
Best,
Vincent

Hi,

  1. We have pushed the latest code into production. So it should be working in normal URL
  2. Still investigating why the contents do not match.
  3. We have a Discord where I may be able to answer these questions in more realtime if you are interested.

– misko

Hi @Misko ,

Thanks for getting back to me, excellent news.
Happy to join on Discord, the link you have provided seems a QWIK endpoint though. If you can provide the right one we can meet there.

Best,
Vincent

Oops: Builder.io OSS: Mitosis + Partytown + Qwik => Qwik-API / General

Thanks, I’ve joined if you have any questions.

Vincent

Good news, it is now working in QA: https://qa.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=%2F&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML
And production should have it later today https://cdn.builder.io/api/v1/qwik/product-landing-page?userAttributes.urlPath=%2F&apiKey=dc5c96804c6c4a068e9558f30660aaee&output=HTML