Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Nokia N9 app installed from Ovi Store behaves differently than locally compiled version (Digia Remote Camera) (SOLVED)
Forum Updated to NodeBB v4.3 + New Features

Nokia N9 app installed from Ovi Store behaves differently than locally compiled version (Digia Remote Camera) (SOLVED)

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 2 Posters 6.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kwhitefoot
    wrote on last edited by
    #1

    I am trying to send email from my N9 without user intervention. After failing over and over I decided to try to find an open source app that did it so that I could examine the source code. The one I chose was Digia's example of a Remote Camera: "http://store.ovi.com/content/275567":http://store.ovi.com/content/275567.

    I obtained the source from "https://gitorious.org/remote-camera":https://gitorious.org/remote-camera, opened it in QtCreator (latest stable version but I can't remember the version number). After answering the questions about creating files for Harmattan, etc., I compiled it without problems.
    I was then rather disappointed to find that when I ran it on my N9 that I got exactly the same message in the console as I had with my own code. The message was from the send function and said that it could not find the default account.

    When I installed the binary from the Ovi store it worked perfectly.

    So what am I missing?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      daliusd
      wrote on last edited by
      #2

      I could guess that it has something to do with manifest.aegis (but I doubt that in this case). Do you get error code, error message or something like that? That could be used as starting point. Output in QtCreator's console window might contain relevant information as well.

      P.S. I could try running app you have pointed to on N9 but don't have time for that now.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kwhitefoot
        wrote on last edited by
        #3

        If you have a chance to try it out I'd be very grateful. I don't think I am the only one struggling to send email from the N9.
        I have deleted some lines here to get under the 6000 character limit. The full text is in "http://pastebin.com/ZNdZ57MV#":http://pastebin.com/ZNdZ57MV#

        This is what I did:

        git clone git://gitorious.org/remote-camera/remote-camera.git remote-camera

        Then I opened the .pro file in QtCreator

        Qt Creator 2.4.1
        Based on Qt 4.7.4 (32 bit)

        Built on Jan 25 2012 at 11:24:30

        I unchecked the desktop build and checked the box for Harmattan.

        Then I built (clicked the hammer icon).

        A couple of unimportant issues were raised (notification of unstable API) but no errors.

        Then I connected my N9 via USB and ran the program from QtCreator (Control-r)

        The Compile Output window looked like this:

        =======================================

        23:02:41: Running build steps for project remotecamera...
        23:02:41: Configuration unchanged, skipping qmake step.
        23:02:41: Starting: "/usr/bin/make" -w
        make: Entering directory /home/whitefoot/qt-projects/remotecamera-build-harmattan-Harmattan_Target_-_QEmu_PR1_2__Qt_SDK__Release' ... make: Nothing to be done for first'.
        make: Leaving directory `/home/whitefoot/qt-projects/remotecamera-build-harmattan-Harmattan_Target_-QEmu_PR1_2__Qt_SDK__Release'
        23:02:41: The process "/usr/bin/make" exited normally.
        23:02:41: Creating package file ...
        23:02:41: Package Creation: Running command '/home/whitefoot/QtSDK/Madde/bin/mad dpkg-buildpackage -nc -uc -us'.
        ...
        /usr/bin/make INSTALL_ROOT="/home/whitefoot/qt-projects/remotecamera-build-harmattan-Harmattan_Target
        -_QEmu_PR1_2__Qt_SDK__Release"/debian/remotecamera-digia install
        ....
        dh_builddeb
        aegis-manifest: Creating 'remotecamera-digia.aegis'.
        dpkg-genchanges -b -u.. >../remotecamera-digia_1.3.0_armel.changes
        ...
        Package 'remotecamera-digia' installed.

        23:02:56: Connecting to device...
        ...
        Preparing to replace remotecamera-digia 1.3.0 (using .../remotecamera-digia_1.3.0_armel.deb) ...
        Unpacking replacement remotecamera-digia ...
        aegis-installing remotecamera-digia (from '')
        Setting up remotecamera-digia (1.3.0) ...
        Processing triggers for desktop-file-utils ...
        ...
        23:03:31: Package installed.
        23:03:31: Deploy step finished.

        =======================================

        The program started, I touched the start button on the N9 screen waited for the timeout (10 seconds) and then moved it around to simulate movement so that it would take several shots. Then I closed the program with a swipe. The Application output window looked like this:

        =======================================
        Killing remote process(es)...
        Starting remote process ...
        Remote process started.
        Successfully resolved MeeGo graphics system: /usr/lib/qt4/plugins/graphicssystems/libqmeegographicssystem.so

        X Error: BadDamage (invalid Damage parameter) 153
        Extension: 146 (Uknown extension)
        Minor opcode: 2 (Unknown request)
        Resource id: 0x1e00007
        ...
        Found v1.4 driver, enabling brokenTexSubImage
        ...
        MeegoGraphics: found EGL_KHR_fence_sync
        "org.freedesktop.DBus.Error.AccessDenied" "Rejected send message, 3 matched rules; type="method_call", sender=":1.13000" (uid=29999 pid=29132 comm="/opt/remotecamera/bin/remotecamera ") interface="com.nokia.mce.request" member="req_tklock_mode_change" error name="(unset)" requested_reply=0 destination="com.nokia.mce" (uid=0 pid=563 comm="/sbin/mce --force-syslog "))"
        "" ""
        hijackWindow() context created for QmlApplicationViewer(0xaed13a68) 1
        Found SGX/MBX driver, enabling FullClearOnEveryFrame
        Found v1.4 driver, enabling brokenTexSubImage
        QGLWindowSurface: Using plain widget as window surface QGLWindowSurface(0x1f7b9d48)
        "org.freedesktop.DBus.Error.AccessDenied" "Rejected send message, 3 matched rules; type="method_call", sender=":1.13000" (uid=29999 pid=29132 comm="/opt/remotecamera/bin/remotecamera ") interface="com.nokia.mce.request" member="req_tklock_mode_change" error name="(unset)" requested_reply=0 destination="com.nokia.mce" (uid=0 pid=563 comm="/sbin/mce --force-syslog "))"
        "" ""
        libqtcontacts-tracker: initializing libqtcontacts-tracker 4.19.2-1+0m8 for /opt/remotecamera/bin/remotecamera [29132]
        ... The previous line is repeated about 120 times
        libqtcontacts-tracker: engine.cpp:1591: Not cleaning up obsolete resources for nao:hasTag property since the property's range is too generic (rdfs:Resource).
        send Cannot obtain default account
        message.type(): 4 msgType: 0
        void QtMobility::QMessageServicePrivate::stateChanged(QtMobility::QMessageService::State) emitting stateChanged( 3 )
        send Cannot obtain default account
        message.type(): 4 msgType: 0
        void QtMobility::QMessageServicePrivate::stateChanged(QtMobility::QMessageService::State) emitting stateChanged( 3 )
        "org.freedesktop.DBus.Error.AccessDenied" "Rejected send message, 3 matched rules; type="method_call", sender=":1.13000" (uid=29999 pid=29132 comm="/opt/remotecamera/bin/remotecamera ") interface="com.nokia.mce.request" member="req_tklock_mode_change" error name="(unset)" requested_reply=0 destination="com.nokia.mce" (uid=0 pid=563 comm="/sbin/mce --force-syslog "))"
        "" ""
        send Cannot obtain default account
        message.type(): 4 msgType: 0
        void QtMobility::QMessageServicePrivate::stateChanged(QtMobility::QMessageService::State) emitting stateChanged( 3 )
        Meego graphics system destroyed
        QSqlDatabasePrivate::removeDatabase: connection 'qmailstore_sql_connection' is still in use, all queries will cease to work.
        libomap3camd 1.136
        libomap3camd 1.136
        Finished running remote process. Exit code was 0.

        The message:

        send Cannot obtain default account

        is exactly the same as I get when I try to execute similar code in my own programs.

        No email is sent. But if I remove the application and install the binary from the Ovi Store it works perfectly.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          daliusd
          wrote on last edited by
          #4

          Here is little detail for you:

          When you launch app from QtCreator you run your app as "developer" user on N9. If you run your app from start screen by clicking icon you run app as normal user. Thus error "Cannot obtain default account" simply means than user "developer" does not have e-mail account set-up (I am not even sure if that's possible). Could you check if app is working if started by clicking icon? If not I will try compiling it myself later.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kwhitefoot
            wrote on last edited by
            #5

            I feel like kicking myself (and Nokia and Digia).

            It never occurred to me to try that. It works, thank you.

            So, of course, I now have another question: how should one go about debugging programs that include email sending? Is there any better way than simply creating an on device log file? Is there a simple way to redirect the debug output to a file?

            Anyway, I can start to make a bit more progress.

            Thanks again.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              daliusd
              wrote on last edited by
              #6

              Redirecting output to file might be possible. You should run app from terminal. Something like: /opt/app/bin/app > output.txt . I have never tried that myself so I'm not sure if that will work properly - e.g. startup line in desktop file is slightly different but I believe that line only makes your app singleton (no other instance of your app will run if icon is clicked again). I guess that should work. You might need to google how to redirect stderr to file but I guess that will not be necessary.

              Overall regarding "developer" and "user" MeeGo is quite restrictive and it is good thing. That makes N9 more secure. Using "developer" user you can ssh to your N9 but I believe it is impossible to "su" to user. It was possible some time ago but they fixed this security hole.

              I think that's all I can advice.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kwhitefoot
                wrote on last edited by
                #7

                [quote author="daliusd" date="1358083481"]
                ...
                I think that's all I can advice.[/quote]

                Sounds like good advice to me,

                Thanks again.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved