Unleash: unable to fetch feature toggles TypeError: XXXX
voratham opened this issue · 8 comments
Describe the bug
Currently i used unleash-client-proxry-js
with vue2 js and i used sentry for monitoring error
I found some error that I cannot reproduce ?
- Unleash: unable to fetch feature toggles TypeError: Load failed
- Observation I found sentry-platform found on IOS many by not found android browser.
- Unleash: unable to fetch feature toggles TypeError: Failed to fetch
- Observation I found sentry-platform found on Android many by not found safari browser.
my application start unleash by example code below
const startApp = async () => {
try {
await unleash.start()
} finally {
new Vue({
apolloProvider,
router,
store,
render: h => h(App)
}).$mount('#app')
}
}
startApp()
Steps to reproduce the bug
- Go to web-browser
- used network console blocking domain unleash (but on real use case i cannot reproduce) but i found error 2,000 - 11,000
- found error on console
Expected behavior
No response
Logs, error output, etc.
No response
Screenshots
No response
Additional context
No response
Unleash version
3.1.0
Subscription type
Open source
Hosting type
Self-hosted
SDK information (language and version)
No response
Hey @voratham. Can you give us more details about the server-side of your Unleash setup? Are you using proxy, edge or frontend API? What version are they? Have you made any upgrades recently when the error reporting started?
ok i list detail by i used on kubernetes
image
unleashorg/unleash-server:4.10.5
unleashorg/unleash-proxy:0.8.1
for my vue app i have 2 application
app1
unleash-proxy-client 3.1.0
app2
unleash-proxy-client 1.11.0
by app1 i expected upgrade library it will solve my probelm but not work
unleash-proxy:0.8.1 is 2 year old version. Is it possible to upgrade it to the latest one?
@kwasniew Thankyou
i tried to talk to my team but I consider code below it happed in case disconnect ?
Is it possible that unleash-proxry-client
init couldn't keep up?
https://github.com/Unleash/unleash-proxy-client-js/blob/main/src/index.ts#L405-L406
The error you're seeing is probably from line 411: https://github.com/Unleash/unleash-proxy-client-js/blob/main/src/index.ts#L411C16-L411C16
This error means that you send HTTP request but the response never arrived.
In this case we do: console.error('Unleash: unable to fetch feature toggles', e);
https://github.com/Unleash/unleash-proxy-client-js/blob/bac049d8ec641bc7c2f194a3e65add705b0b6ba4/src/index.ts#L437C17-L437C78 which you're seeing in sentry.
There's a few reasons it may happen but the most typical case is there's a network connection problem. Someone using a mobile device goes offline. Or someone with a slow connection times out their request.
Here's a video explaining that with users going offline or requests being blocked by the browser you'll see those errors:
Screen.Recording.2023-11-15.at.12.44.36.mov
unleash-proxy:0.8.1 is 2 year old version. Is it possible to upgrade it to the latest one?
I have some question i should upgrade unleash-servser same? it will breaking change or not ?
unleash-proxy:0.8.1 is 2 year old version. Is it possible to upgrade it to the latest one?
I have some question i should upgrade unleash-servser same? it will breaking change or not ?
You can upgrade proxy separately from the unleash-server. However to benefit from all the improvements (security patches, product enhancements, bug fixes) that we're making every day I'd recommend to also upgrade unleash-server. Here's a detailed info about upgrade: https://docs.getunleash.io/using-unleash/deploy/upgrading-unleash. From the SDK perspective there are no breaking changes.