HelloWorld017 / atom-discord

Integrate with Discord and show Rich Presence information.
https://atom.io/packages/atom-discord
MIT License
105 stars 30 forks source link

Rich Presence is not showing - Ubuntu 18.04.1 #70

Closed TheGejr closed 5 years ago

TheGejr commented 5 years ago

Please use this template only if issue related to Error / Unexpected behavior
Please use suitable tags

Step to reproduce

  1. Install atom-discord
  2. Add atom in the game activity in Discord.

Stacktrace

2 errors occure in ctrl+shift+i in Discord. It's the same error that occure twice

Error: Error 1 when fetching info on 10672
    at 26b013b….js:40
e.(anonymous function) @ 26b013b….js:119

(link address) https://discordapp.com/assets/26b013b91aadec737cbd.js

Information

Platform: Ubuntu 18.04.1 LTS x86_64 Kernel: 4.15.0-36-generic Atom: apm 2.1.1 npm 6.2.0 node 8.9.3 x64 atom 1.31.2 python 3.6.5 git 2.17.1 Discord: couldn't find a version number but it's latest update is 16 Oct 2018

Package Version: 3cc031c 10 days ago link

Non-Core Packages

I supose this is other installed packages in atom? Else ignore this.

atom-live-server 2.3.0
busy-signal 1.4.3
file-icons 2.1.25
ftp-remote-edit 0.12.18
highlight-selected 0.14.0
intentions 1.1.5
language-htaccess 0.2.0
language-latex 1.2.0
language-markdown 0.27.0
latex-autocomplete 1.1.1
linter 2.2.0
linter-eslint 8.4.1
minimap 4.29.9
minimap-pigments 0.2.2
pigments 0.40.2

(disabled)
emmet 2.4.3
linter-jscs 4.1.3
linter-jshint 3.1.8
linter-sass-lint 1.8.3
linter-ui-defualt 1.7.1

What have I done?

I have followed the guide provided in the readme.md. I have tried all 3 metodes of installing atom-discord, via the in atom package manager, via terminal with apm and I've installed it via source, none have worked.

I did noticed however everytime i close atom, discord doesn't find it again. As it is launced with a new PID. an example. (You can find this when hovering over the "last played 22 minutes ago" in game activity section)

First time adding Atom to the game activity /SNAP/ATOM/202/USR/SHARE/ATOM/ATOM --EXECUTED-FROM=/HOME/APOLLO --PID=10656

After rebooting Atom and adding it again /SNAP/ATOM/202/USR/SHARE/ATOM/ATOM --EXECUTED-FROM=/HOME/APOLLO --PID=14133

"APOLLO" here being my pc username.

HelloWorld017 commented 5 years ago

Could you give atom logs (not discord logs) and terminal logs (when starting atom)?

TheGejr commented 5 years ago

In the ctrl+shift+i in atom there occures no errors, I do get one warning,

No deserializer found for                                           <embedded>: 21450
deserialize @ <embedded>:21450

I can't seem to find any logs.

HelloWorld017 commented 5 years ago

Then how about terminal logs? (Please start atom in terminal)

If there isn't a text like Editor (hash) has been online, it means atom-discord could not start successfully.

TheGejr commented 5 years ago

When I start atom in a terminal nothing appears, it just immediately goes back to "normal mode".
screenshot from 2018-10-22 08-25-42

TheGejr commented 5 years ago

Nevermind that I found out how to make it log in the terminal here it is. screenshot from 2018-10-22 08-37-40

HelloWorld017 commented 5 years ago

It means that discord-rpc could not find paths. ((prefix)/discord-ipc-0, 1, ...) I don't know why discord-rpc failed to connect to discord, but I have found an issue maybe relevant to you (discordjs/RPC#36). Please follow these steps and run atom in terminal.

in ~/.atom/packages/atom-discord/node_modules/discord-rpc/src/transports/IPC.js: Change line 125 to:

return `${prefix.replace(/\/$/, '')}/snap.discord/discord-ipc-${id}`;

Also, please double check discord is running while turning on atom. In most cases, message that could not connect means discord is not running.

TheGejr commented 5 years ago

Changing that line resolved the problem and Discord immediately picked up atom-discord and showed the rich presence. Thank you.

officialpiyush commented 5 years ago

The https://github.com/HelloWorld017/atom-discord/commit/8d145b6f08c8998f73c5292d68e2a95e280439e4 has Not Fixed it. It Still cant read that. i Still can reproduce

package hash- https://github.com/HelloWorld017/atom-discord/commit/c20fc88b9de8ffc1e5c60c2109f21f65a6039622 os - Ubuntu 18.04 LTS

HelloWorld017 commented 5 years ago

Please resend your terminal logs while "Ubuntu 18.04 Fix option" is turned on.

officialpiyush commented 5 years ago

how do we do that tho?

HelloWorld017 commented 5 years ago

Run atom in your terminal and capture standard output logs

officialpiyush commented 5 years ago

[17:00:22 GMT+0530 (IST)] Initializing configs...
[17:00:23 GMT+0530 (IST)] [Configs]
{ behaviour: { customAppId: '380510159094546443', updateTick: 15000 },
  detail: { text: 'working-project', textCustom: '' },
  elapsed: { handleRest: 'false', handleRestDelay: 60, send: true },
  i18n: 'en-US',
  largeImage: 
   { image: 'currentType',
     imageCustom: '',
     text: 'type-description',
     textCustom: '' },
  rest: 
   { fileName: 'editing-idle',
     fileNameCustom: '',
     largeImage: 'rest',
     largeImageCustom: '',
     restOnAfk: false,
     restOnAfkThreshold: 180,
     restOnBlur: false,
     smallImage: 'default',
     smallImageCustom: '',
     typeName: 'developer-idle',
     typeNameCustom: '' },
  smallImage: 
   { image: 'atom',
     imageCustom: '',
     text: 'atom-description',
     textCustom: '' },
  state: { text: 'editing-file', textCustom: '' },
  troubleShooting: 
   { debugLog: true,
     noDiscordNotification: true,
     ubuntuPatch: true } }
[17:00:23 GMT+0530 (IST)] Initializing RPC...
[17:00:23 GMT+0530 (IST)] Experimental Ubuntu Snap Patch Enabled.
[17:00:23 GMT+0530 (IST)] Logging in RPC with ID 380510159094546443
[17:00:23 GMT+0530 (IST)] Error: Could not connect
    at Socket.o (/home/piyush/atom-discord/dist/rpc.bundle.js:1:69656)
    at Object.onceWrapper (events.js:315:30)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

[17:00:26 GMT+0530 (IST)] Editor jmy5pa74l1g became online.
[17:00:26 GMT+0530 (IST)] New editor confirmed, sending activities...```
officialpiyush commented 5 years ago

This is what logged in log.txt ^

officialpiyush commented 5 years ago

Nevermind https://github.com/iCrawl/discord-vscode/issues/66#issuecomment-466661126 Followed this and it was fixed!!!

HelloWorld017 commented 5 years ago

I've added the list to FAQ! Because there are nothing for me to do as this bug is not part of atom-discord, now I'm closing this issue. If the bug still exists after following the list, feel free to reopen!