H4ckd4ddy/flipperzero-sentry-safe-plugin

API version mismatch

matthewthepolymath opened this issue · 6 comments

This issue has been going around every time i've tried to import these files onto my flipper zero. What should I do?
Screenshot-20221226-090627

I came across this issue as well. Figure out what firmware and version you are on (Rouge, Unleashed, Official, etc) in my case I was on official firmware v0.74.2. Go to the firmware github main page, grab the https:// path under code. Download Gitbash if you don't have it already, in git bash navigate to the folder you want to clone the firmware repository to and then run git clone in my case it was this: git clone https://github.com/flipperdevices/flipperzero-firmware.git

Do the same thing with this sentry safe repository in a different folder location.

Take the entire flipperzero-sentry-safe-plugin folder and place it in the applications_user folder found in the firmware directory.

Open elevated command prompt, navigate to the folder with the firmware you just cloned, make sure you're in the directory that has the fbt.cmd in it. Run the following command .\fbt.cmd fap_dist APPSRC=applications_user/flipperzero-sentry-safe-plugin. It will download a bunch of dependencies and then if you placed with sentry safe folder in the right place will complie your app.

The app will be found in the dist folder of your firmware folder. In my case it was \dist\f7-D\apps\apps\GPIO but I'm not sure if that path is static. Get the Sentry_Safe.fap from that location and copy it to your Flipper. If you performed these actions successfully and the firmware folder you cloned is the same firmware on your actual device, you shouldn't run into the API version mismatch anymore.

For anyone who doesn't want to read that wall of text -

This error is thrown because your Sentry_safe.fap was compiled against a different release version than the one you're running on your device. The solution is to recompile this project against the release you're running - or follow these instructions

ARSN1 commented

Every time I try to recompile using fbt it gives me this error, Failed to resolve application for given APPSRC=applications_user/flipperzero-sentry-safe-plugin
File "C:-----------\flipperzero-firmware\scripts\fbt_tools\fbt_extapps.py", line 294, in GetExtAppByIdOrPath

This is after it says there are many errors with the code itself.

image

Every time I try to recompile using fbt it gives me this error, Failed to resolve application for given APPSRC=applications_user/flipperzero-sentry-safe-plugin File "C:-----------\flipperzero-firmware\scripts\fbt_tools\fbt_extapps.py", line 294, in GetExtAppByIdOrPath

This is after it says there are many errors with the code itself.

image

Just a guess but do you have git installed on your system? The documentation for fbt says it’s required and those errors mean functions are being used prior to them being declared. Since I don’t believe the functions in question are unique to the 3rd party app it makes me think core functions of fbt or its dependencies are not present. If you followed my instructions you would have git on your system but if you obtained the code another way (by just manually downloading) that may be your issue.

ARSN1 commented

yeah I have git downloaded and I did everything you said.

edit: reading closer it says that its treating all warnings as errors.

Hi,
Sorry for the delay, I just merge changes about mutex API (#8), seem to solve the issue.
Best regards