raelgc / scudcloud

ScudCloud - Slack for Linux
https://launchpad.net/~rael-gc/+archive/ubuntu/scudcloud
MIT License
1.22k stars 99 forks source link

Stuck At Loading Screen #335

Closed antonio-malcolm closed 7 years ago

antonio-malcolm commented 8 years ago

ScudCloud never makes it past the Loading screen, during user login. This is on v1.1.12, installed from the source tar packages, with all requirements (Python 3, QT, python-qt, python-dbus, et al.)

raelgc commented 8 years ago

Hi @antonio-malcolm and thanks for reporting this issue!

Which distro, version and desktop environment are you using?

ichristo commented 8 years ago

I am having this issue with Fedora 23. I able to get around the issue by setting the graphic system to native:

$ QT_GRAPHICSSYSTEM=native scudcloud

raelgc commented 8 years ago

Maybe in the Fedora package, this command should be part of the .desktop file.

raelgc commented 8 years ago

@antonio-malcolm Can you tell us if the workaround suggested by @ichristo worked?

antonio-malcolm commented 8 years ago

Just tested it, and it doesn't work for me. I'm on Void GNU/Linux, with Openbox, and have tested against both Qt4 and Qt5. Also, I have no console available in the Web Inspector, when running with the --debug TRUE option. Version of ScudCloud is 1.1.12

raelgc commented 8 years ago

@antonio-malcolm you have to type exactly scudcloud --debug=True, including case. You need dbus and the python3-dbus packages too.

antonio-malcolm commented 8 years ago

I already have dbus and python3-dbus (all listed required packages are installed). adding --debug=True, here is what I get in the inspector console

2016/1/22 16:03:02.681 booted! pri:0
rollup-core_required_ts.js:12016/1/22 16:03:02.681 248ms from first html to TS.boot()
mixpanel-2-latest.min.jsFailed to load resource: SSL handshake failed
rollup-secondary_a_required.js:20browser not recognized, defaulting to restrictive referrer policy
rollup-core_required_ts.js:12016/1/22 16:03:02.783 _onDOMReady
rollup-core_required_ts.js:12016/1/22 16:03:02.783 session_load_count_client: 1
rollup-core_required_ts.js:12016/1/22 16:03:02.784 migrating to compressed format
rollup-core_required_ts.js:12016/1/22 16:03:02.784 migration to compressed format complete, 0 migrated
rollup-core_required_ts.js:12016/1/22 16:03:02.785 _set _ls.setItem failed, flushing. TS.storage.storageSize():0
rollup-core_required_ts.js:12016/1/22 16:03:02.785 TS.storage.fetchLastEventTS() is empty so flushing channel data
3rollup-core_required_ts.js:12016/1/22 16:03:02.785 _set _ls.setItem failed, flushing. TS.storage.storageSize():3
rollup-core_required_ts.js:12016/1/22 16:03:02.785 _disabled:false
rollup-core_required_ts.js:12016/1/22 16:03:03.227 794ms from first html to calling onStarts()
rollup-core_required_libs.js:22TypeError: 'undefined' is not a function (evaluating 'this._onElClick.bind(this)')
rollup-secondary_a_required.js:3TypeError: 'null' is not an object (evaluating 'TS.model.user.is_restricted')
rollup-core_required_ts.js:12016/1/22 16:03:03.497 rtm.start included latest event timestamp: 1453506783.000000
rollup-core_required_ts.js:12016/1/22 16:03:06.569 _flushBuffer _ls.setItem failed once, flushing all our keys. TS.storage.storageSize():3
rollup-core_required_ts.js:12016/1/22 16:03:06.569 0
rollup-core_required_ts.js:12016/1/22 16:03:06.569 _flushBuffer _ls.setItem failed once, flushing all our keys. TS.storage.storageSize():3
rollup-core_required_ts.js:12016/1/22 16:03:06.569 0
rollup-core_required_ts.js:12016/1/22 16:03:06.569 _flushBuffer _ls.setItem failed once, flushing all our keys. TS.storage.storageSize():3
rollup-core_required_ts.js:12016/1/22 16:03:06.569 0
rollup-core_required_ts.js:12016/1/22 16:03:06.569 _flushBuffer _ls.setItem failed once, flushing all our keys. TS.storage.storageSize():3
rollup-core_required_ts.js:12016/1/22 16:03:06.569 0
rollup-core_required_ts.js:12016/1/22 16:03:06.569 _flushBuffer _ls.setItem failed once, flushing all our keys. TS.storage.storageSize():3
rollup-core_required_ts.js:12016/1/22 16:03:06.569 0
rollup-core_required_ts.js:12016/1/22 16:03:06.569 _flushBuffer _ls.setItem failed once, flushing all our keys. TS.storage.storageSize():3
rollup-core_required_ts.js:12016/1/22 16:03:06.569 0
rollup-core_required_ts.js:12016/1/22 16:03:06.569 _flushBuffer _ls.setItem failed once, flushing all our keys. TS.storage.storageSize():3
rollup-core_required_ts.js:12016/1/22 16:03:06.569 0
jvican commented 8 years ago

Sorry, I just opened an issue about this https://github.com/raelgc/scudcloud/issues/383.

I have the same problem. Any solution?

raelgc commented 8 years ago

What is your Qt version?

You can check it running python from terminal and then:

from PyQt4.QtCore import QT_VERSION_STR
print("Qt version:", QT_VERSION_STR)

Output will be something like this:

('Qt version:', '4.8.6')
raelgc commented 8 years ago

Additionally, these are my ~/.config/scudcloud/scudcloud.cfg permissions:

18:45 ~/.config$ ls -la scudcloud/
total 24
drwxrwxr-x  4 rael rael 4096 Fev  8 08:35 .
drwx------ 40 rael rael 4096 Fev  8 08:35 ..
drwxrwxr-x 18 rael rael 4096 Fev  8 08:35 data7
drwxrwxr-x  2 rael rael 4096 Fev  8 17:37 prepared
-rw-rw-r--  1 rael rael 5364 Fev  8 08:40 scudcloud.cfg
jvican commented 8 years ago

Outputs:

('Qt version:', '4.8.6')
18:45 ~/.config$ ls -la scudcloud/
total 24
drwxrwxr-x  4 jvican jvican 4096 Fev  8 08:35 .
drwx------ 40 jvican jvican 4096 Fev  8 08:35 ..
drwxr-xr-x 18 jvican jvican 4096 Fev  8 08:35 data7
drwxr-xr-x  2 jvican jvican 4096 Fev  8 17:37 prepared
-rw-r--r--  1 jvican jvican 5364 Fev  8 08:40 scudcloud.cfg

I changed the permissions and no luck.

jvican commented 8 years ago

Any news on this? Next steps maybe?

raelgc commented 8 years ago

Hi @jvican, I've updated ScudCloud with the version command to include more info about your system.

Can you, please, update and then run scudcloud --version and paste the output here?

jvican commented 8 years ago

Here you have it:

ScudCloud 1.10
Python 3.4.3
Qt 4.8.6
PyQt 4.11.1
SIP 4.16.
raelgc commented 8 years ago

Interesting, your PyQt and SIP are even newest then mine:

ScudCloud 1.10
Python 3.4.3
Qt 4.8.6
PyQt 4.10.4
SIP 4.15.5
jvican commented 8 years ago

Straight from the Gentoo packages repo... Could you please install them and check that they are working for you?

Just to remind you, scudcloud gets stucked in the page when it's loading the slack channel. BTW, I have grsecurity installed. Is there maybe a conflict?

raelgc commented 8 years ago

Is it possible disable it for some time just in order to check if is it blocking?

jvican commented 8 years ago

I fear it's not. It's meant to be always enabled. Otherwise that would be a security bug... But it's highly probable that this error is not related to grsecurity at all. I brought it up just in case you are doing something really fancy under the hood and accessing thing you shouldn't.

raelgc commented 8 years ago

No, just saving configs in the ScudCloud config folder and downloading the team icons in the temp folder to display in notifications.

volhovm commented 8 years ago

I have the same error on NixOS (xmonad). Here's my version output:

ScudCloud 1.12
Python 3.4.4
Qt 4.8.7
PyQt 4.11.3
SIP 4.16.6

Even with --debug=True flag i get no debug output except for this only message:

QSystemTrayIcon::setVisible: No Icon set

(I don't use tray so it's OK I suppose)

jvican commented 8 years ago

My guess is that it's related to WMs (Window Managers). I use dwm and @volhovM uses xmonad.

szymonpk commented 8 years ago

I've same issue as op, running Gentoo with KDE5

$ python3 -m scudcloud --version
ScudCloud 1.16
Python 3.4.3
Qt 4.8.7
PyQt 4.11.4
SIP 4.17
$ python3 -m scudcloud --debug=True
URL Changed: https://slack.com/signin
Link Clicked: https://foo.slack.com/
URL Changed: https://foo.slack.com/messages

Is there any way I can help?

raelgc commented 8 years ago

Any lucky if you guys try with the qt5 port?

Just one reminder: rename your .config/scudcloud/ folder before use the qt5 version. If not, it'll not start.

szymonpk commented 8 years ago

It doesn't start for me

...
    proxy = urlparse(os.environ.get('http_proxy') or os.environ.get('HTTP_PROXY'))
NameError: name 'urlparse' is not defined
raelgc commented 8 years ago

@szymonpk Sorry, fixed now. Can you git pull and try again?

szymonpk commented 8 years ago

I've PyQt5.5.1 with webkit compiled, but app is throwing

    undo = self.current().pageAction(QtWebKit.QWebPage.Undo)
AttributeError: 'module' object has no attribute 'QWebPage'

Shouldn't it be PyQt5.QtWebKitWidgets.QWebPage (http://pyqt.sourceforge.net/Docs/PyQt5/api/qwebpage.html)?

raelgc commented 8 years ago

@szymonpk Exactly! I've merged from master yesterday before put kids in bed, fixed conflicts, but had no time to test and fixed this small issues yet.

szymonpk commented 8 years ago

When I've fixed PyQt5.QtWebKitWidgets.QWebPage and QApplication import it's QtWidgets.QApplication.keyboardModifiers() now, everything works, I'm able to log in and so on.

I've noticed that credentials aren't saved on exit

    data.append(cookie.toRawForm()+ "\n")
TypeError: unsupported operand type(s) for +: 'QByteArray' and 'str'
Aborted
raelgc commented 8 years ago

@szymonpk I pushed more fixes. But it appears that the way to serialize cookies and restore them is not the same as in qt4.

szymonpk commented 8 years ago

Everything works fine except this 'serialization issue' my credentials aren't saved.

volhovm commented 8 years ago

Bump. Is there any idea how to make it work with qt4?

volhovm commented 8 years ago

Tried qt5-port with:

ScudCloud 1.16
Python 3.4.4
Qt 5.5.1
PyQt 5.5.1
SIP 4.16.6

Got some kind of ssl-related problem. It appears 2 seconds after "loading..." screen shows. I also tried to launch it with .config/scudcloud removed. The same thing.

[volhovm@avishai:~/Downloads/Telegram Desktop]$ scudcloud --debug=True
URL Changed: https://slack.com/signin
URL Changed: https://MYCOMPANY.slack.com/
URL Changed: https://MYCOMPANY.slack.com/messages
URL Changed: https://MYCOMPANY.slack.com/messages/global/
QSystemTrayIcon::setVisible: No Icon set
Traceback (most recent call last):
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/urllib/request.py", line 1183, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/http/client.py", line 1137, in request
    self._send_request(method, url, body, headers)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/http/client.py", line 1182, in _send_request
    self.endheaders(body)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/http/client.py", line 1133, in endheaders
    self._send_output(message_body)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/http/client.py", line 963, in _send_output
    self.send(msg)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/http/client.py", line 898, in send
    self.connect()
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/http/client.py", line 1287, in connect
    server_hostname=server_hostname)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/ssl.py", line 362, in wrap_socket
    _context=self)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/ssl.py", line 580, in __init__
    self.do_handshake()
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/ssl.py", line 807, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/cc67hrp81i7yz7r4ck9l9a752ac31czr-scudcloud-1.16-qt5/lib/python3.4/site-packages/scudcloud/wrapper.py", line 204, in populate
    file_name, headers = request.urlretrieve(data['icon'], icon_path)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/urllib/request.py", line 186, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/urllib/request.py", line 161, in urlopen
    return opener.open(url, data, timeout)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/urllib/request.py", line 464, in open
    response = self._open(req, data)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/urllib/request.py", line 482, in _open
    '_open', req)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/urllib/request.py", line 442, in _call_chain
    result = func(*args)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/urllib/request.py", line 1226, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/nix/store/4fr5rgsizd5q72fr8lsixvb274awg6nk-python3-3.4.4/lib/python3.4/urllib/request.py", line 1185, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)>
Aborted
jagajaga commented 8 years ago

I have the same problems nowadays. Using xmonad.

volhovm commented 8 years ago

Also not working on xfce. NixOS,

ScudCloud 1.20
Python 3.4.4
Qt 4.8.7
PyQt 4.11.3
SIP 4.16.6
dirk-olmes commented 8 years ago

Same here on Gentoo

ScudCloud 1.22 Python 3.4.3 Qt 4.8.7 PyQt 4.11.1 SIP 4.16.9

when runnig with --debug=True you can right-click on the HTML view and open the web console. Seeing errors in the console output looks like trouble to me:

rollup-core_required_libs.js:24Unhandled rejection TypeError: 'undefined' is not a function (evaluating 'this._onElClick.bind(this)')
rollup-secondary_a_required.js:3TypeError: 'null' is not an object (evaluating 'TS.model.user.is_restricted')

Inspecting the JS console output of a browser window with slack loaded, I don't see that error.

volhovm commented 8 years ago

Just tested 1.34, still no success.

volhovm commented 8 years ago

Hey, i'm happy to report that commit 6d924b5c23597c94d1a8e829a8a5d917806a5bc9 of branch 245-port-to-qt5 actually works! But menu buttons of the application (File/Edit/View) do not :)

raelgc commented 8 years ago

@volhovM Nice! Probably it was the commit 452a82ee1c6e58bed44ca31e7dbfa013989bef7f, which includes a function that sounds like expected by Slack.

In case of this issue returns, feel free to open this issue again!

volhovm commented 8 years ago

@raelgc So you're not planning to fix it in master?

raelgc commented 8 years ago

@volhovM It was fixed in master first, then I applied to qt5 branch. I'm trying to keep both branches with same fixes.

volhovm commented 8 years ago

@raelgc i've just tested 6ef9eef441a4fee7294365f86262be2f08b68d2c, it doesn't work.

raelgc commented 8 years ago

@volhovM You should test commit 452a82e (or the newest version of branch 245).

dirk-olmes commented 8 years ago

As far as I understand the issue's history it started out as report that scudcloud does not work on PyQt4. For me, it still doesn't, tested with 6ef9eef441a4fee7294365f86262be2f08b68d2c as @volhovM

The 254-port-to-qt5 branch does work but IMHO this issue should remain open until master works on PyQt4.

I've tried a bit to debug what might be wrong on master/PyQt4 but the error seems to be on the JS/Slack side. So far I haven't really figured out to understand how the integration works. A bit of explanation might enable me to do some more debugging ....

raelgc commented 8 years ago

Thank you @dirk-olmes for the clarification. I've reopened the issue.

The Slack engine will check if the container it's running has some capabilities. Based on this, it'll behave a bit different. By example: Slack will ask the container if it can display HTML notifications.

The integration between them is in, ScudCloud case, in scudcloud/resources/scudcloud.js file, which is a minified file (source is located at sources/scudcloud-src.js).

So, you can copy the source file to replace the minified file in your system, modify it, and start ScudCloud with debug enable to inspect in the JS console.

volhovm commented 7 years ago

Since master now uses qt5 by default, I think the problem should be fixed. Works for me on last 1.58 release.