arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Troubleshooting

See the most frequent issues occurring during integration.

The most frequent issues occurring during integration:

hashtag
General

chevron-rightCould not determine the dependencies of task ':freerasp-react-native:compileDebugAidl'hashtag

Solution:

  • In package.json, update react-native to a higher patch version and run npm install (or yarn install).

  • See to find out which patch version is relevant for you.

chevron-rightInvalid hook call. Hooks can only be called inside of the body of a function component.hashtag

Reason: The useFreeRasp Hook cannot be called inside useEffect.

Solution:

hashtag
Android Devices

chevron-rightExecution failed for task ':freerasp-react-native:minifyReleaseWithR8'.hashtag

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 , which also contains additional information about the issue.

hashtag
iOS Devices

chevron-rightUnsupported Swift architecturehashtag

Reason: 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:

For more general issues or questions, visit page. You can also check out the , where you can report issues and view existing reports.

If you want to initialize freeRASP inside useEffect, you have to handle the initialization on your own. Such inititialization would look like this:

Where actions, config are objects described in the integration guide.

this issuearrow-up-right
this comment on Google Issue Trackerarrow-up-right
FAQ
Issues section of our GitHub repositoryarrow-up-right
#ifndef TALSECRUNTIME_SWIFT_H
#define TALSECRUNTIME_SWIFT_H
import {
  setThreatListeners,
  talsecStart,
  removeThreatListeners,
} from 'freerasp-react-native';

...

useEffect(() => {
  setThreatListeners(actions);
  talsecStart(config);

  return () => {
    removeThreatListeners();
  };
}, []);