plasma-applet-githubissues icon indicating copy to clipboard operation
plasma-applet-githubissues copied to clipboard

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

Open Mrcuve0 opened this issue 6 years ago • 5 comments

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.

Mrcuve0 avatar May 23 '19 14:05 Mrcuve0

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.

Zren avatar May 24 '19 18:05 Zren

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

Mrcuve0 avatar May 25 '19 09:05 Mrcuve0

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.

Zren avatar May 26 '19 02:05 Zren

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!

Mrcuve0 avatar May 26 '19 09:05 Mrcuve0

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

SendUserAgent=true
UserAgentKeys=:om
  • SendUserAgent=false is when "Send Identity" is unchecked.
  • UserAgentKeys=:m is when "Send OS" is unchecked (and machine/processor is checked but disabled)

Zren avatar May 05 '20 18:05 Zren