Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Can't launch after installing from AUR #95

Open
g0rdonL opened this issue Aug 28, 2020 · 7 comments
Open

Can't launch after installing from AUR #95

g0rdonL opened this issue Aug 28, 2020 · 7 comments

Comments

@g0rdonL
Copy link

g0rdonL commented Aug 28, 2020

(gtkcord3:2514593): Gtk-WARNING **: 18:59:41.541: gtk_window_set_titlebar() called on a realized window
Error: 18:59:41.638663 Failed to parse file in : share:1:0Failed to import: Error opening file /home/gordon/.local/share: Is a directory
panic: Failed to get current user's ID.

Thanks

@Magnusm94
Copy link

I'm having the same issue.
For each time I'm going to open, I have to run this command before it wants to open:
rm -rf ~/.config/gtkcord

So to me it seems obvious that there is an issue loading the files from there.
I'm also getting this message:
warning: no suitable Go value from object for arg 0: missing marshaler for type
I'm assuming that we both have the same error of not installing this the way it's recommended in the readme. I'll update if I find a way to fix it.

@micwoj92
Copy link
Contributor

-git or stable?

@Magnusm94
Copy link

Magnusm94 commented Oct 27, 2020

Okay, I've tried a little more:
The first errors was using stable, but -git is working better. The only issue I'm currently having is that it does not remember the token. Most errors are still the same, but this one is new (happens after login using token):
(gtkcord3:65585): Gtk-CRITICAL **: 18:11:32.966: gtk_bin_remove: assertion 'priv->child == child' failed

At launch I'm also still having nearly the same errors as @g0rdonL, but it does launch without removing the config folders. These warnings are not yet mentioned:
Info: 18:12:41.067959 Keyring token is empty.
Error: 18:15:38.883257 [non-fatal] Failed to set Gtkcord token to keyring

edit: The difference in ~/.config/gtkcord between stable and git version, is that -git also creates settings.json
.
├── lastread.json
├── plugins
└── settings.json

Still looking into this :)

@diamondburned
Copy link
Owner

The line

warning: no suitable Go value from object for arg 0: missing marshaler for type

is caused by gotk3 and certain types. If I recall correctly, I've submitted a PR to them (which was merged), but gtkcord3 is still behind.

I'm not sure what's wrong with ~/.config.

@Magnusm94
Copy link

Okay after troubleshooting even more, I think I have found the issue, but not a solution yet.
In the main.go file, and more specifically LoadToken() function, it does not return anything. Or more specifically os.Getenv("TOKEN") = ""

I tested this with:

package main

import (
    "os"
    "fmt"
)

func LoadToken() string {
    var token = os.Getenv("TOKEN")
    if token != ""{
        return token
    } else {
        return "could not find token"
    }
    return token
}

func main() {
    fmt.Println(LoadToken())
}

I may completely be missing something, trying to learn go on the fly, but this script returns "could not find token" every time. My assumption right now is that this triggers and error in ...../gtkcord3/internal/keyring/keyring.so >> Get()
I'm not exactly sure on what more there is to do about that issue. At least -git version is working though, so hope it works for you @g0rdonL

@g0rdonL
Copy link
Author

g0rdonL commented Oct 27, 2020

I just installed from git.
I get this when launching:
gtkcord3: error while loading shared libraries: libhandy-0.0.so.0: cannot open shared object file: No such file or directory

@Magnusm94
Copy link

Magnusm94 commented Oct 27, 2020

Does it launch at all though @g0rdonL

Also for the issue I was talking about earlier, I found that it works nicely:

  1. git clone https://aur.archlinux.org/gtkcord3-git.git && cd gtkcord-git
  2. git clone https://github.com/diamondburned/gtkcord3
  3. vim ./gtkcord3/main.go then change the LoadToken() function to:
func LoadToken() string {
	var token = "YOUR_DISCORD_TOKEN_HERE"
	if token != "" {
		return token
	}

	// flag.StringVar(&token, "t", "", "Token")
	// flag.Parse()

	return token
}
  1. tar cf - gtkcord3 | pigz -9 > gtkcord3.tar.gz
  2. Change source in PKGBUILD to:
source=('gtkcord3.tar.gz'
	'gtkcord3.desktop'
	'fix-build.patch')

Also change sha256sums. Can find the new one by doing: sha256sum gtkcord3.tar.gz

  1. save and makepkg -si

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants