1

I'm using Qt to develop a Symbian app.

I downloaded qjson from the link. I followed the instructions in that link and yes, I have the qjson.sis file. Now I need to use it in my app. When I tried, I got this error.

Launch failed: Command answer [command error], 1 values(s) to request: 'C|101|Processes|start|""|"MyProject.exe"|[""]|[]|true' {"Code":-46,Format="Failed to create the process (verify that the executable and all required DLLs have been transferred) (permission denied)"} Error: 'Failed to create the process (verify that the executable and all required DLLs have been transferred) (permission denied)' Code: -46

And when I press the launch icon, it shows, "Unable to execute file for security reasons".

Then I install the qjson.sis in my mobile and then tried to install my app, I got this error.

:-1: error: Installation failed: 'Failed to overwrite file owned by another package: c:\sys\bin\qjson.dll in ' Code: 131073; see http://wiki.forum.nokia.com/index.php/Symbian_OS_Error_Codes for descriptions of the error codes

In my .pro file I have this.

symbian: {
addFiles.sources = qjson.dll
addFiles.path = /sys/bin
DEPLOYMENT += addFiles
}

symbian: {
LIBS +=  -lqjson
}

Any ideas...?

Joshua
  • 27
  • 2
  • 7
  • 1
    I use [QtJson](https://github.com/ereilin/qt-json). Absolutely the same in means of (de-)serialization, but easier to incorporate with your current codebase: just add sources (2 files) to your project. – Aleksei Zabrodskii Oct 03 '12 at 19:39
  • I've just hit the exact same problem as Joshua. On simulator everything works fine, while installing on device fails. I thought that it has something to do with 'capabilities' of qjson.pro = 'ReadDeviceData WriteDeviceData' as applications marked with them need to pass the (non-self!) signing process, but I've removed those capabilities, cleaned&rebuilt and the problem is still there.. – quetzalcoatl Oct 04 '12 at 12:26
  • @Joshua - if it says that it is unable to overwrite, maybe try to uninstall everything related to qjson and your application, restart the device and try then? Sometimes some modules stay in the memory and block overwriting – quetzalcoatl Oct 04 '12 at 12:28
  • @quetzalcoatl - I tried as you said. Uninstalled qjson, restarted my device several times. But the issue remains. – Joshua Oct 04 '12 at 14:39

1 Answers1

0

Ok, I've just resolved a similar issue: it seems that your current build of QJson's library has different UID3 than the previous one that you installed on the phone.

Each .SIS file that is installed on the device has an identifier. The phone OS tracks which file was installed by which packacge, and if some new package wants to overwrite an existing file, the OS checks whether the new package has the same 'identity' than the previous owner of the file to be overwritten.

If the identity does not match, this error pops up.

There are number of reasons why this could have happened. For example, you could have simply changed the UID3 of the QJson before the build. Or, maybe you have forgot to set the library's UID3? Check the "src.pro' in the QJson project and go to the half of the file, you'd see lines:

#TARGET.UID3 = 
TARGET.CAPABILITY = ReadDeviceData WriteDeviceData

If there's #, then you have forgot to set it and the build process assumed, well, letssay 'a random value'. So, now, set it to something, ie. TARGET.UID3 = 0xE0123456. Remember to correct that once you are ready to publish the application.

If a package with broken UID3 gets onto your phone and is blocking something - simply: uninstall it. Go to Settings/Installations/Installed, then find "qjson" and uninstall it. Afterwards, next installtion of qjson should succeed with no problems.

quetzalcoatl
  • 32,194
  • 8
  • 68
  • 107
  • Thanks for your reply. But I have set a valid qjson UID3. I added Target capabilities too. And the sis file is custom signed. This is what I have in my qjson.pro file: TARGET.UID3 = 0xXXXXXXXX TARGET.CAPABILITY = NetworkServices ReadUserData WriteUserData ReadDeviceData WriteDeviceData Am I missing something else..? – Joshua Oct 04 '12 at 14:36
  • Is it possible that some other project that you installed previously has installed the /sys/qjson.dll ? Maybe simply you already have that library installed there by some other applciation>? – quetzalcoatl Oct 04 '12 at 14:58
  • Thank you so much. At last I find out the solution. The missing part of my code is this. INCLUDEPATH += /epoc32/include. I included this in my .pro file of my project. Now I can use qjson to parse data in my project. Thank u once again for your comments. – Joshua Oct 08 '12 at 05:59
  • I'm glad you have found a fix! However, it is very strange you've had to add that line. This is a part of a standard search path, and the QtCreator's qmake scripts should be setting that up automatically. Of course provided that the toolchain and platform sdk are installed properly in the project options. If you encounter more similar problems, be sure to check the SDK installation! – quetzalcoatl Oct 08 '12 at 11:08