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 setup with CSR and GitLab instance #44
Comments
|
Thanks for submitting this, @sebkasanzew. We'll take a look! 👀 |
|
Thank you for reporting. I identified an issue. You have Correct me if I'm wrong, but I don't think GitLab is supplying Frontend API or Unleash Proxy. You need something in between of GitLab server and your frontend app. That something can be Proxy, Unleash Edge, or Next.js API route resolving toggles. |
|
Hi @sebkasanzew. Did you manage to fix this? Can I in any other way help explain differences between endpoints? Do you expect that to be in the documentation somewhere? |
|
Sorry for the late response, I'm on vacation till the end of June. I also commented wrongly where the JSON comes from. It's the result of I'll try to apply your suggestions in July, when I'm fully available again. |
|
@sebkasanzew I'm closing it for now. Please reopen this or tag me in a comment if you encounter any undesired SDK behavior. |
Describe the bug
The unleash client doesn't get the flag information from the GitLab instance. Although the proxy in
/pages/api/feature-flags.tsxreturns a JSON with seemingly enough information and a status code 200.Here is a codesandbox with the reproduces issue:
https://codesandbox.io/p/sandbox/unleash-nextjs-issue-44-35tcdu
You can find:
<FlagProvider />in/pages/index.tsxuseFlagin/components/Features.tsx.envSteps to reproduce the bug
/components/Features.tsxis not shownExpected behavior
The feature "my_feature" should be read and handled correctly by the unleash client and the text "My feature should be visible" should be visible.
Logs, error output, etc.
No response
Screenshots
No response
Additional context
Instead of an actual GitLab instance, I mocked the response of the GitLab Unleash instance in
/pages/api/feature-flags.tsxwhich is als present in the real app and is used as a proxy.Unleash version
GitLab v15.10 (self hosted)
Subscription type
Open source
Hosting type
Self-hosted
SDK information (language and version)
@unleash/nextjs v1.0.0
The text was updated successfully, but these errors were encountered: