Zren / plasma-applet-githubissues

https://store.kde.org/p/1271237/
25 stars 5 forks source link

"#123 by Submitter was closed 0 years ago" (Caused by System Settings > User Agent unchecked) #9

Open Mrcuve0 opened 5 years ago

Mrcuve0 commented 5 years ago

HI Zren, thank you for this widget.

I installed it from the KDE store and tried immediately to add my repos like in the following picture. Screenshot_20190523_163834

Sadly, the widget is showing only this (I guess) "placeholder" string as in the following image: Screenshot_20190523_163953 I tired many times refreshing the widget and adding other repositories with more issues (wrt my repos) (both closed and open) but nothing seems to change.

Could this be a problem related to Github APIs, maybe?

Thank you for your attention.

Zren commented 5 years ago

Looks like when I cleaned up the branch for a final release, I didn't make sure I filtered out whitespace.

So delete extra whitespace / newlines in the repo list text area. I'll patch in it the next version.

Mrcuve0 commented 5 years ago

Hi Zren, thank you for your help.

Here the steps that I made:

  1. I deleted extra whistespaces and newlines as you suggested: nothing changed
  2. I inserted only one repo of mine to avoid as many errors as possible: the widget page was now blank (like screenshot below).
  3. I tired to insert your repo and refresh many times: Screenshot_20190525_111108

and now nothing appears: Screenshot_20190525_111154

Thank you for your patience, let me know if I'm unclear or if you need additional details

Zren commented 5 years ago

What happens if you edit ~/.local/share/plasma/plasmoids/com.github.zren.githubissues/contents/ui/Main.qml and uncomment showDebug: true

From:

Logger {
    id: logger
    name: 'githubissues'
    // showDebug: true
}

To:

Logger {
    id: logger
    name: 'githubissues'
    showDebug: true
}

Then run:

QT_LOGGING_RULES="qml.debug=true" plasmawindowed com.github.zren.githubissues

It will normally show:

qml: [githubissues:debug] Async.parallel.done null 1

but I assume null will be an error in your case. I haven't gotten around to showing an error in the widget's GUI.

Mrcuve0 commented 5 years ago

Ok Zren, done and solved.

QT_LOGGING_RULES="qml.debug=true" plasmawindowed com.github.zren.githubissues
org.kde.plasmaquick: Applet preload policy set to 1
org.kde.plasma: requesting config for "GitHub Issues" without a containment!
kf5.kservice.services: "" has no desktop group, cannot construct a KPluginInfo object from it.
qml: [localdb:debug] initDb.start
qml: [localdb:debug] initDb.ready
qml: [githubissues:debug] updateIssuesModel
qml: [githubissues:debug] getIssueList Zren/plasma-applet-githubissues all
qml: [localdb:debug] db.get Zren/plasma-applet-githubissues 2019-05-26 08:55:51 "Request forbidden by administrative rules. Please make sure your request has a User-Agent header (http://developer.github.com/v3/#user-agent-required). Check https://developer.github.com for other possible causes.\r\n"
qml: [githubissues:debug] getJSON Zren/plasma-applet-githubissues Request forbidden by administrative rules. Please make sure your request has a User-Agent header (http://developer.github.com/v3/#user-agent-required). Check https://developer.github.com for other possible causes.

I remembered something related to the User Agent in the Plasma Settings: in fact I had the "Send Identification" disabled, that's why the problem on the User Agent.

Screenshot_20190526_111247

Now everything works and all my repos are correctly fetched, sorry if I wasted your time with these silly things. I'll vote your Plasmoid on the KDE Store ASAP, maybe it's not so much but it's a way to thank you.

Finally, thank you again for your work: I love your plasmoids and I'd like to add them to my Look-And-Feel themes as dependencies, obviously while giving you all the credit you deserve.

Let me know if you don't want to or you have special requests to make!

Have a nice Sunday!

Zren commented 4 years ago

Todo: Parse ~/.config/kio_httprc and show a warning if not:

SendUserAgent=true
UserAgentKeys=:om