Troubleshooting See the most frequent issues occurring during integration.
The most frequent issues occurring during integration:
General
Could not determine the dependencies of task ':freerasp-react-native:compileDebugAidl'Solution:
In package.json
, update react-native
to a higher patch version and run npm install
(or yarn install
).
See this issue to find out which patch version is relevant for you.
Invalid hook call. Hooks can only be called inside of the body of a function component.Reason: The useFreeRasp
Hook cannot be called inside useEffect
.
Solution:
If you want to initialize freeRASP inside useEffect
, you have to handle the initialization on your own. Such inititialization would look like this:
Copy import {
setThreatListeners ,
talsecStart ,
removeThreatListeners ,
} from 'freerasp-react-native' ;
...
useEffect (() => {
setThreatListeners (actions);
talsecStart (config);
return () => {
removeThreatListeners ();
};
} , []);
Where actions
, config
are objects described in the integration guide.
Android Devices
Execution failed for task ':freerasp-react-native:minifyReleaseWithR8'.Sealed classes are not supported as program classes when generating class files.
Reason: Kotlin sealed classes are not supported in AGP 8.1 used by some versions of RN (currently 0.73.x)
Solution: Follow this comment on Google Issue Tracker , which also contains additional information about the issue.
iOS Devices
Unsupported Swift architectureReason: The arm64 macro is not set under Rosetta.
Solution: Go to <your_project>/node_modules/freerasp-react-native/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h
and move the following code (lines 4 and 5 in the file) to the top of the file:
Copy #ifndef TALSECRUNTIME_SWIFT_H
#define TALSECRUNTIME_SWIFT_H
For more general issues or questions, visit FAQ page. You can also check out the Issues section of our GitHub repository , where you can report issues and view existing reports.