Comments (9)
Hi,
We would need more details on your integration. Can you confirm this is running against the hosted api at api.bullet-train.io?
Can you provide as much info as possible, including browser console logs etc?
from flagsmith-js-client.
Yes, my project is running against app.bullet-train.io
I am actually have not much information, but /identify endpoint seem does not get response, and i only able to see CORS error in the console. Seem /identify request has been rejected for that user, not too sure what exactly reason here?
Any provide is really appropriately!
Thanks/Cuong
from flagsmith-js-client.
We'd need to see explicit code and logs to be able to help I'm afraid.
from flagsmith-js-client.
Here are code what i have setup in my project, it written in typescript:
import bulletTrain from "bullet-train-client";
I have wrapped under my static method to catch exception from bullet to see what is exactly error has been throwed.
static identify(id) {
try {
bulletTrain.identify(id);
} catch (e) {
console.error('Error identifying: ', e); <==== this never reached
}
}
The above call send user Id, to ask bullet identify user, and if successed, user info (id / email) will be persisted into bullet.
But as far as i noticed, identify method has been rejected and the error catch never been reached,
I only noticed in console this error:
'https://api.bullet-train.io/api/v1/traits/' from origin 'https://mywebsite' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Which more info you need, just let me know?
Thanks/Cuong
from flagsmith-js-client.
Does this happen every time you make the call?
from flagsmith-js-client.
Yes, it happen every time.
from flagsmith-js-client.
Are you able to email [email protected] with details of the Environment API key etc and ideally a small piece of code that can be run by itself that reproduces this?
from flagsmith-js-client.
Additionally to this, it would be worth checking what ID identify is being called with, it could be that unsafe url characters are causing this.
from flagsmith-js-client.
Are you able to find the request object in the Chrome developer tools network tab, then right click and copy as cURL, then try and run it as a cURL request. Does that work or fail?
from flagsmith-js-client.
Related Issues (20)
- [Bug] - NextJS >= 13.0.0 SSR `useFlagsmith` state not matching the state that is passed to the provider. HOT 16
- flagsmith/react only works in React 18 HOT 3
- [Bug] - TypeError: Cannot read properties of null (reading 'getValue') HOT 5
- Flagsmith's 'useFlags' doesn't return actual cached flags when request failed HOT 2
- Rollup Name for react HOT 5
- Inconsistent license information HOT 2
- Caching with multiple instance doesn't work HOT 6
- Typing issue in react.tsx: 'flagsmith' is possibly 'null' HOT 3
- useFlags() race condition HOT 8
- Different environments not working HOT 5
- Localstorage cache is not being wiped out in some edge cases HOT 3
- Support `getValue` fallback without `json` flag HOT 2
- useFlags not updating values in react18/Nextjs App Router
- 3.23.0 seems to have broken something HOT 4
- Intermittent Flakiness in Feature Flags on Safari/MacOS HOT 2
- Flags are null when the cacheFlags option is true HOT 3
- Typescript compiler errror `Cannot find name 'F'.` when compiling flagsmith in Angular project HOT 3
- Bundle ES(flagsmith-es) and combine with standard CJS module (flagsmith)
- Identifier/trait confusion when using `cacheOptions: { skipAPI: true } ` HOT 3
- Add a devtools option HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flagsmith-js-client.