Closed virenradadiya closed 1 year ago
Hello @virenradadiya,
Thanks for opening your first issue.
The build failure might be caused by the version of React Native you are using in the project.
Please try to update React Native to a higher patch version as explained here: https://github.com/facebook/react-native/issues/35210
Let us know if that helped.
Best,
Tomas, Talsec developer
Hello @virenradadiya ,
did you try updating React Native to a higher patch version as @tompsota suggested? Did that help?
Kind regards, Matúš, Talsec dev
@virenradadiya Fixed Issue with these steps:
2 .Change syntax of the maven library.
Example:
Change
maven{url = uri("https://nexus3-public.monetplus.cz/repository/ahead-talsec-free-rasp")}
with
maven { url 'https://nexus3-public.monetplus.cz/repository/ahead-talsec-free-rasp'}
Hello @virenradadiya ,
were you able to solve the issue? NB: a new version has been released.
Kind regards, Talsec team
Any solution for this problem? I updated the lib version and I keep getting the same error
Hello @wellespaiva-dev,
what versions of react-native
and freerasp-react-native
are you using?
Best, Tomas, Talsec developer
"react-native": "0.69.5", "freerasp-react-native": "2.0.1",
I managed to fix the error with @muqeet98 solution, but I'm getting another error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons
I am getting the error when using the function useFreeRasp(config, actions);
I'm calling the function inside the useEffect in the main App.js
@wellespaiva-dev,
Glad to hear you fixed the first issue.
You see the other error because useFreeRasp is a hook itself and cannot be called inside another hook. You can either move useFreeRasp outside the useEffect or alternatively remove the provided hook and start freeRASP in your useEffect instead. Such useEffect would look like this:
useEffect(() => {
setThreatListeners(actions);
talsecStart(config);
return () => {
removeThreatListeners();
};
}, []);
You can import all methods from freerasp-react-native
module.
The return part is optional, but highly recommended.
Best, Tomas, Talsec developer
Hello @wellespaiva-dev , did proposed solution work?
Kind regards, Talsec team
Hello @talsec-app, the proposal worked! Thank you very much.
A doubt! Is there any documentation on what each config represents? Is it all necessary to work?
Hugs.
Hi @wellespaiva-dev,
The keys in config object are explained here: https://github.com/talsec/Free-RASP-ReactNative#the-configuration-object-should-consist-of. If you are developing only for Android, you don't need to specify config for iOS and vice versa.
Does this answer your question?
Best, Tomas, Talsec developer.
Hello @talsec-app I'm building a build on ios and sending it to testFlight, but I'm getting this error when opening the app: Library not load: @rpath/Talsec Runtime.framework/Talsec Runtime
NOTE: The error does not happen in debug mode
Hello @wellespaiva-dev ,
which version of the freeRASP are you using? Could you show us, how this folder looks? node_modules/freerasp-react-native/ios
.
Kind regards, Talsec team
@talsec-app
Hello @wellespaiva-dev ,
is the TalsecRuntime.xcframework in that folder a symlink, or is it a folder? Did you integrate previously some of the previous versions of freeRASP?
In the new version, we have removed the dependency on the symlink and integration script switching between the dev and release version of the SDK. You have to remove also the integration script:
node_modules/freerasp-react-native/ios, TalsecRuntime.xcframework
is a folder, not a symlink. If it is a symlink, remove it and reinstall the module.pod install
Please, let us know if it helps.
Hi @talsec-app,
Regarding the first question, TalsecRuntime.xcframework is a folder (as shown in the image below). The version of freerasp-react-native is more current, 2.0.1.
In the second case, TalsecRuntime.xcframework is not found in Target -> Build Phases -> Link Binary With Libraries, as shown in the images below.
Thirdly, I didn't find that integration script you guys mentioned. The images below show the only scripts that already existed before the implementation of the library.
Anyway, I'm going to leave the crashlog file that testFlight generates when there is a crash signal in the application.
I'm waiting for a possible solution. Hugs.
Hi @talsec-app,
I have updated the library to 2.0.2 and the error persists.
Hello @wellespaiva-dev ,
did you run pod install in the iOS directory after adding (or upgrading) the plugin? If yes, could we try:
Hi, @talsec-app
I tried to do what you asked and another error occurred! In this error I can't even run the app in debug mode.
Here is the evidence below:
Hi @wellespaiva-dev,
Can you try following?
TalsecRuntime.xcframework
also in Build Phases > Link Binary With Libraries:
If not, please add it there as well:
<yourProject>/ios/Pods/Target Support Files/Pods-<yourProject>
Pods-<yourProject>-frameworks-Debug-input-files.xcfilelist
and delete line that contains TalsecRuntime
Pods-<yourProject>-frameworks-Debug-output-files.xcfilelist
Pods-<yourProject>-frameworks-Release-input-files.xcfilelist
Pods-<yourProject>-frameworks-Release-output-files.xcfilelist
If the suggestion above didn't help, can you please answer these questions?
Cheers,
Tomas, Talsec developer
Hi @talsec-app,
I did what you asked and it worked for the problem above, but it keeps closing the app in release versions.
1 - Does this error happen only on TestFlight? E.g. does the app work when you run it in release mode locally? R: There is no local release version, versions are generated via xcode and uploaded directly to TestFlight. Running locally in debug mode the error does not happen.
2 - Is this a clean installation or are you upgrading freeRASP from 1.x.x to 2.x.x? R: When I started the lib it was in version 2.0.1, and I updated it to 2.0.2. I uninstalled and reinstalled and the error persisted. The error occurs since version 2.0.1.
3 - I noticed that the first Run Script deletes the info.plist file. Although we did not encounter any issues with that so far, it seems suspicious to me. Is there any specific reason why you added that script? R: The application contains two targets, so this script refers to the "react-native-config" library, where it checks which target was started to know which .env file to use.
Hi @wellespaiva-dev,
Can you try following:
Do you see the error now? This will help us to determine if the problem is in the implementation or only on TestFlight.
Also we just released an updated iOS framework in v2.0.3, can you try it out? Maybe it will help.
Best, Tomas, Talsec developer
Hello @wellespaiva-dev, did you manage to solve the issue? Does it still persist in v3.1.0?
Kind regards, Talsec team
Closing the issue due to inactivity. Feel free to reopen if there are any updates.
Describe the bug I am having an error like Required by the project: free-rasp-react-native while building the app after installing the dependency.
Screenshots error Screenshots
My build.Gradle