Closed MDbrosev closed 3 years ago
As per the documentation - "Make sure that issuer and apiUrl matches the running address of the .HttpApi.Host or .Web project." When using Conveyor the local and remote ports do not match, could this be the issue?
Hi @MDbrosev
I reproduced it without Conveyor and I see the error you mentioned:
[Unhandled promise rejection: TypeError: undefined is not an object (evaluating 'delete state.activeLoadings[action.payload.key]')]
However, it is not a blocker for the app. If you refresh the running app in the Expo, the error does not occur again. I configured the backend to run on my IP address with HTTP, I could not see any problem. Your problem is probably related to the Conveyor.
If you solve the problem, please let us know the solution.
I created an issue about the TypeError
above:
https://github.com/abpframework/abp/issues/7646
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@MDbrosev @mehmet-erim
I have reproduced the issue on abp v4.3.
I am unable to login to the react-native app after configuring the app (backend and react-frontend) as stated in the official abp-react-native Getting Started guide.
If you solved the issue kindly advise how you handled it.
Thank you in abdance.
If you solved the issue kindly advise how you handled it.
Thank you in advance.
@ShifanilaSenthil @mugambiwarwema If I remember correctly, the RN app in Expo blocks HTTP requests. I deployed the backend which provided me with an HTTPS URL and was able to work around it.
@mugambiwarwema I have given the running address of authserver as apiurl and running address of HttpApi.Host as Issuer in Env.js file, i am trying to run as emulator not from an Expo app..but still this error occurs.
@ShifanilaSenthil Take a look at the RN networking docs; it's actually iOS and Android blocking the request since it is not HTTPS. Have you tried replacing localhost in the api url with the ipv4 address of the machine running the service?
https://reactnative.dev/docs/network
By default, iOS 9.0 or later enforce App Transport Security (ATS). ATS requires any HTTP connection to use HTTPS. If you need to fetch from a clear text URL (one that begins with http) you will first need to add an ATS exception. If you know ahead of time what domains you will need access to, it is more secure to add exceptions only for those domains; if the domains are not known until runtime you can disable ATS completely.
On Android, as of API Level 28, clear text traffic is also blocked by default. This behavior can be overridden by setting "android:usesCleartextTraffic" in the app manifest file.
@MDbrosev , The issue still exist even after enabling the "usesCleartextTraffic": true in the app.json file.
"plugins": [ [ "expo-build-properties", { "android": { "usesCleartextTraffic": true }, "ios": { "deploymentTarget": "13.0", "usesCleartextTraffic": true } } ] ]
The APIs and AuthServer are running in HTTP, and given my localIP instead of the localhost, but the issue is not yet resolved. This issue seems happening always if we follow the documentation. Can you please help on this asap as it is blocking my development?
Steps to replicate from scratch:
Results in the following error:
Code: