With purpose 1.1rc, posting an image to imgur via the quickshare applet fails. Output is: org.kde.plasma: unversioned plugin detected, may result in instability kf5.kservice.sycoca: Opening ksycoca from "/home/antonio/.cache/ksycoca5_es_C7OfTnvNnOpJmtpcAjGkR1qCZY4=" kf5.kservice.sycoca: checking file timestamps org.kde.kwindowsystem: Loaded plugin "/usr/lib/qt/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so" for platform "xcb" org.kde.plasma: unversioned plugin detected, may result in instability org.kde.plasma: requesting config for "Compartición rápida" without a containment! Cannot initialize model with data QJsonObject() . missing: QJsonValue(string, "urls") file:///usr/share/plasma/plasmoids/org.kde.plasma.quickshare/contents/ui/ShareDialog.qml:48:24: Unable to assign QJSValue to QJsonObject file:///usr/lib/qt/qml/org/kde/purpose/RunningJob.qml:46:16: Unable to assign ulong to double launching... "/usr/lib/kf5/purposeprocess" 0x3742dd8 "{\"mimeType\":\"image/jpeg\",\"urls\":[\"file:///home/antonio/us.jpg\"]}" QJsonObject({"mimeType":"image/jpeg","urls":["file:///home/antonio/us.jpg"]}) kf5.kjobwidgets: kuiserver found kf5.kservice.sycoca: Opening ksycoca from "/home/antonio/.cache/ksycoca5_es_C7OfTnvNnOpJmtpcAjGkR1qCZY4=" kf5.kservice.sycoca: checking file timestamps qml: Received undefined file:///usr/share/plasma/plasmoids/org.kde.plasma.quickshare/contents/ui/main.qml:157: Error: Cannot assign [undefined] to QString Reproducible: Always
When pasting text to pastebin, it works the first time, but trying to paste a second time gives the same error: file:///usr/share/plasma/plasmoids/org.kde.plasma.quickshare/contents/ui/main.qml:157: Error: Cannot assign [undefined] to QString
Hi, thanks for reporting. I've been trying to reproduce but I didn't manage to. Can you show me what output you get with this patch? diff --git a/applets/quickshare/plasmoid/contents/ui/main.qml b/applets/quickshare/plasmoid/contents/ui/main.qml index c5644a4..263f1ae 100644 --- a/applets/quickshare/plasmoid/contents/ui/main.qml +++ b/applets/quickshare/plasmoid/contents/ui/main.qml @@ -151,6 +151,7 @@ DropArea { } } onFinished: { + console.log("finished", output, error) if (error==0 && output.url !== "") { var resultUrl = output.url; console.log("Received", resultUrl)
Now that I tried again, it seems to work sometimes. But it still fails most of the time for me (so perhaps Comment 1 wasn't accurate: it worked the second time by chance) With the extra debug line I get qml: finished [object Object] 0 in both cases (when it works and when it fails)
Sorry, another try... diff --git a/applets/quickshare/plasmoid/contents/ui/main.qml b/applets/quickshare/plasmoid/contents/ui/main.qml index c5644a4..7dd435f 100644 --- a/applets/quickshare/plasmoid/contents/ui/main.qml +++ b/applets/quickshare/plasmoid/contents/ui/main.qml @@ -150,7 +150,17 @@ DropArea { root.state = "sending" } } + + function printMap(output) { + for(var v in output) { + console.log("entry", v); + console.log("entry-value", output[v]); + } + } + onFinished: { + printMap(output) + console.log("finished", error) if (error==0 && output.url !== "") { var resultUrl = output.url; console.log("Received", resultUrl)
When it fails: qml: entry uninitialized qml: entry-value true qml: finished 0 qml: Received undefined file:///usr/share/plasma/plasmoids/org.kde.plasma.quickshare/contents/ui/main.qml:167: Error: Cannot assign [undefined] to QString When it works: qml: entry url qml: entry-value http://i.imgur.com/BH397uZ.png qml: finished 0 qml: Received http://i.imgur.com/BH397uZ.png If there are more patches to test, please attach them, either bugzilla or firefox is screwing with the spacing.
Created attachment 99052 [details] Another try to figure it out, this time in Purpose
org.kde.plasma: unversioned plugin detected, may result in instability org.kde.plasma: unversioned plugin detected, may result in instability org.kde.plasma: requesting config for "Compartición rápida" without a containment! Cannot initialize model with data QJsonObject() . missing: QJsonValue(string, "urls") file:///usr/share/plasma/plasmoids/org.kde.plasma.quickshare/contents/ui/ShareDialog.qml:48:24: Unable to assign QJSValue to QJsonObject file:///usr/lib/qt/qml/org/kde/purpose/RunningJob.qml:46:16: Unable to assign ulong to double launching... "/usr/lib/libexec/kf5/purposeprocess" 0x2b44908 "{\"mimeType\":\"image/png\",\"urls\":[\"file:///home/antonio/Im\xC3\xA1genes/asistente1.png\"]}" QJsonObject({"mimeType":"image/png","urls":["file:///home/antonio/Imágenes/asistente1.png"]}) qml: lalala {"objectName":"","error":0,"errorText":"","errorString":"","percent":{},"capabilities":0,"data":{"mimeType":"image/png","urls":["file:///home/antonio/Imágenes/asistente1.png"]},"output":{"uninitialized":"true"},"percent":{}} qml: entry uninitialized qml: entry-value true qml: finished 0 qml: Received undefined file:///usr/share/plasma/plasmoids/org.kde.plasma.quickshare/contents/ui/main.qml:167: Error: Cannot assign [undefined] to QString
It looks to me that you're hitting an error in the plugin and it's not being reported correctly. I just pushed some changes to purpose 1.1 branch. Can you please give it a try?
I don't get any additional output with 1.1 head (as of commit b7e8598)
Git commit 20c3204caa50a3f1a731c50df20c51cc7395cd32 by Aleix Pol. Committed on 19/05/2016 at 01:03. Pushed by apol into branch '1.1'. Make sure that all information has flowed in before giving up on the job Sometimes important information sent right before finishing can be lost. M +3 -1 src/externalprocess/processjob.cpp http://commits.kde.org/purpose/20c3204caa50a3f1a731c50df20c51cc7395cd32
*** Bug 372316 has been marked as a duplicate of this bug. ***