Samsung / Tizen.NET

Welcome to Tizen .NET
Other
213 stars 32 forks source link

Extra package installation is failed. sap must be installed MANUALLY! #54

Closed EmilAlipiev closed 2 years ago

EmilAlipiev commented 4 years ago

Describe the bug

this is old issue as referenced link below. Issue was closed but it still exist in 1.4.1 version of Tizen extension. I dont know if it is extension related or Tizen Studio. I have created a support ticket but didnt get any solution. So i decided to create issue here. For me none of the emulators are useable currently. I tried mobile and watch emulators 4.0 and 5.0 both are returnin this error message. https://github.com/Samsung/Tizen.NET/issues/2

Screenshots If applicable, add screenshots to help explain your problem. image

Environment (please complete the following information):

Exception message;

23:18:38.966|11340|I|       ecs| 369|[pkgs]C:\Users\user\Documents\TizenSDK\platforms\tizen-4.0\common\emulator\bin\..\..\..\wearable\emulator-images\add-ons\sap   8185KB/s (2356526 bytes in 0.281s)

23:18:38.972|11340|I|       ecs| 454|[pkgs] SDB push SUCCESS.
23:18:39.018|11340|I|       ecs| 369|[pkgs]Switched to 'root' account mode

23:18:39.118|11340|I|       ecs| 596|[pkgs] Request to install : sap, amd-1.3.19-300.i686.rpm, csapi-1.1.0-0.i686.rpm, iap-galaxyapps-0.0.11-1.i686.rpm, libnss-security-manager-1.3.5-100.i686.rpm, libsecurity-manager-client-1.3.5-100.i686.rpm, remote-app-control-0.0.1-1.i686.rpm, sap-1.9.5-0.i686.rpm, security-license-manager-1.3.5-100.i686.rpm, security-manager-1.3.5-100.i686.rpm, security-manager-policy-1.3.5-100.i686.rpm, security-privilege-manager-0.0.5-20.i686.rpm, security-privilege-manager-extension-wearable-0.0.5-20.i686.rpm, w-extension-sdk-1.0.0-1.i586.rpm, webapi-plugins-sec-0.27-0.i686.rpm
23:18:39.587| 6328|I|       ecs| 626|[pkgs] Package Installation Failed: sap, amd-1.3.19-300.i686.rpm, csapi-1.1.0-0.i686.rpm, iap-galaxyapps-0.0.11-1.i686.rpm, libnss-security-manager-1.3.5-100.i686.rpm, libsecurity-manager-client-1.3.5-100.i686.rpm, remote-app-control-0.0.1-1.i686.rpm, sap-1.9.5-0.i686.rpm, security-license-manager-1.3.5-100.i686.rpm, security-manager-1.3.5-100.i686.rpm, security-manager-policy-1.3.5-100.i686.rpm, security-privilege-manager-0.0.5-20.i686.rpm, security-privilege-manager-extension-wearable-0.0.5-20.i686.rpm, w-extension-sdk-1.0.0-1.i586.rpm, webapi-plugins-sec-0.27-0.i686.rpm
C:\Users\user\Documents\TizenSDK\platforms\tizen-4.0\common\emulator\bin\\emulator-x86_64: Extra package installation is failed.
sap must be installed MANUALLY!
rookiejava commented 4 years ago

/cc @sangwook96-lee, @winstone77, PTAL

idkiller commented 4 years ago

I had the same problem as this one on my windows 10 PC. This seems like a timing issue. In my case, after deleting the target from the emulator manager and re-creating it, the extension installed fine again. But when re-creating it often happens the same Issue.

nemethmik commented 4 years ago

Same here, I use Tizen Studio 3.7, the message "Extra package installation is failed. sap must be installed manually" is shown, but the app runs fine on the 4.0 emulator. And then the message is not coming back, only when I restart the emulator 4.0. However, on a 5.5 emulator I get the error message "Extra package installation is failed. cert must be installed manually" is shown, and the app doesn't install at all on the 5.5 emulator because of signature error -12. I had created a Samsung certificate and my apps run fine on Galaxy Watch, so I definitely cannot use the 5.5 emulator. I can live with the 4.0 emulator and this "sap must be installed manuall" message.

rookiejava commented 4 years ago

@sangwook96-lee, @winstone77 Any updates, please?

aberteau commented 4 years ago

I was able to install the sap package manually once but when i tried to reproduce on a new emulator, I got errors.

Here is the procedure :

From sdb console > sdb push [tizen_sdk_path]\platforms\tizen-4.0\wearable\emulator-images\add-ons\sap /opt/usr/home/owner/sap

> sdb root on

Switched to 'root' account mode

> sdb shell rpm -i /opt/usr/home/owner/sap/sap-1.9.5-0.i686.rpm

Running sap %posttrans script

The package has been successfully installed and after emulator reboot, AccessoryService Emulator on Android Device was correctly connected.

But impossible to reproduce. I tried to redo the operations on a new emulator, I get errors.

error: Can't write smack rules error: Setting up smack rules for sap failed error: sap-1.9.5-0.i686: install failed error: Unable to write device security policy to /etc/device-sec-policy

aberteau commented 4 years ago

I was able to install the sap package manually and unlike my previous post, I managed to reproduce it several times.

Here is the procedure :

  1. Copy packages from the host computer to the target. > sdb push [tizen_sdk_path]\platforms\tizen-4.0\wearable\emulator-images\add-ons\sap /tmp/.emulator/apps/sap

  2. Switches to root mode > sdb root on

  3. Remount filesystem as Read/Write > sdb shell mount -o rw,remount /

  4. Install sap > sdb shell rpm -Uvh /tmp/.emulator/apps/sap/sap-1.9.5-0.i686.rpm

The package has been successfully installed. After emulator reboot, AccessoryService Emulator on Android Device was correctly connected.

I have reset the emulator several times and have repeated these operations, always successfully. The error message (Extra package installation is failed...) still appears at startup, but the package is correctly installed and working.

Vascomax commented 4 years ago

TL;DR Same problem here. For me SAP with Tizen 4.0 emulator does still not work.

I am having the same issue with the current 4.0 tizen emulator image and the wearable extension SAP. Thanks for the help so far. But for me it does not work yet. I can install most of the packages. But somehow the packages and dependencies ar messed up. Two of the RPMs are older than what is pre-installed in the image. And the security-manager related packages are depending on each other. I could install the provided version (.100) with --nodeps and then install the other ones... but the provided extension SDK files via the package manager should be maybe fixed. Anyway in the end I still get the error pop-up and SAP does not work. After the first reboot after the installation The AccessoryService Emulator shows connected, but the app does not connect to the device. If I "refresh" the Emulator for Samsung Accessory on the phone (by deleting app data and restart), it shows disconnected. If I start up an 3.0 wearable emulator it connects right away and also the app works. I might go on testing a bit with reinstalling 4.0 emulators, but since the 4.0 image in combination with the currently provided extensions seems broken on my machine I will soon go back to 3.0 testing, which luckily still works fine.

@aberteau Did you only install the sap.rpm ?

aberteau commented 4 years ago

@Vascomax : I confirm that I only installed the SAP package. I have listed all the manipulations performed manually on the standard image.

If that can help you, I will put the version of the various components (image, RPM packages, ..) in a next post. I also exported the image with the SAP package installed. I can make it available if you want to download it.

Vascomax commented 4 years ago

@aberteau Thank you. I think I finally reached a state where it is kinda working. I reinstalled a lot. Installed the packages except the ones which are newer on the image, or if other ones were needed based on the pre-installed versions. And I messed a bit with the commands in post-install.sh. Executing them manually. I could get the connection and the app to work. However it is quite buggy. If the connection is interrupted, there is no automatic reconnect like in 3.0. I always need to run the sdb -e shell systemctl restart sap command every time to get reconnected. Quite annoying. And I still get the error message on start-up. Can you get a automatic reconnect if you do the following?

At least on my system this automatic reconnect works with 3.0 but not with 4.0

I will keep using the 3.0 for main testing and use 4.0 only if I have to. Since it is hard (and annoying) to find problems in your app under test, when you can not know for sure if the connection problems are cause by the emulator image/packages and you need to restart the sap again.

But thanks a lot. Your commands made it at least possible to install packages in the first place and use 4.0 sometimes.

Vascomax commented 4 years ago

At least I found out how to get rid of the error message popup. As I suspected, it was a package conflict with the installed image packages. To make the message not come up, you have to delete in the sap add-in folder the packages which are newer on the image (as per today) this are: -amd-1.3.19-300.i686.rpm (since the newer one amd-1.3.26-70.1.i686.rpm is pre-installed) -security-privilege-manager-0.0.5-20.i686.rpm -security-privilege-manager-extension-wearable-0.0.5-20.i686.rpm (0.0.5.21.7 pre-installed)

Then you can create a new emulator boot it up and the remaining packages incl. sap should be installed automatically with no further error messages. Alternatively you can go here and download newer versions of the packages. However I still needed to have at least the amd-package removed. Otherwise the error will be there.

However, this still does not solve my connect / reconnect problem. So for me the situation has not changed..: It works occasionally but not great.

OmegaZero commented 4 years ago

@Vascomax - How do you find out what packages are already installed on the emulator?

Vascomax commented 4 years ago

@OmegaZero Since it was already longer time ago, I don't remember all the things, but I'm sure when you try to manually install a package via the shell, and there is already a newer version installed, it will tell you exactly which version is installed when the installation fails (in case you did not set the "ignore and force install anyway" option on the rpm command)

Ornolfr commented 4 years ago

Did anyone have a problem with Tizen 4.0+ emulator and real device that wouldn't let the app launch? It gets installed successfully but then nothing happens when user taps on it. If I completely remove SAP-related code from my app, everything works ok, but otherwise it bugs out.

matthewkrueger commented 4 years ago

@Ornolfr happens constantly. Uninstall/reinstall usually fixes it. Sometimes I have to swap between Debug and Release builds to get it to run. Sometimes I delete the release and debug folders from the build and that fixes it. Par for the course with Tizen Dev!

Ornolfr commented 4 years ago

@matthewkrueger Thanks for a quick reply. Unfortunately, nothing from your list helps. I can constantly reproduce this issue for all emulators except Tizen 3.0. My client has Samsung Gear S3 with Tizen 4.0.0.7 and he has the same issue. However, he could install the production version from Galaxy Apps store and launch it successfully. Looks like I'm having the same issue as this #79. I'm using C/C++ Native so no idea how to fix it.

matthewkrueger commented 4 years ago

Yup @Ornolfr same issue #79 I reported but with .NET. Tizen is fun!

EmilAlipiev commented 3 years ago

quick question, what kind of solution did you use to detect crashes with tizen. especially with .net. Crashlytics or app.center etc. dont work i believe.

Ornolfr commented 3 years ago

@aberteau @Vascomax could you provide the Tizen 4.0 image that works with SAP?

danergo commented 3 years ago

Guys, anyone has update on this? I'm also struggling with this: I've managed to install sap (sap-1.7.54-0.i686.rpm from version 3.0) onto 5.5 emulator, it works. At least it connects to "Emulator for Samsung Accessory". I can also compile a sample for version 5.5 emulator, but when I try running it, sap_agent_initialize always gives permission denied errors. I'm not using .NET, but native C, sorry for posting here, but this looks the most promising thread for this issue. So guys, who have a working SAP on any emulator above 3.0, can you share your thoughts, configs, or files please?

Thanks.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days