Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Won't launch #3

Open
vanessakindell opened this issue Jun 12, 2022 · 11 comments
Open

Won't launch #3

vanessakindell opened this issue Jun 12, 2022 · 11 comments

Comments

@vanessakindell
Copy link

OS: System76 Pop!_os

Commands: flatpak install com.tdameritrade.ThinkOrSwim
flatpak run com.tdameritrade.ThinkOrSwim

Result: he installation directory has been set to /home/[my home folder]/thinkorswim.
Extracting files ...
Finishing installation ...
sed: can't read /home/[my home folder]/.var/app/com.tdameritrade.ThinkOrSwim/data/thinkorswim/workspace.*.tos.prod.xml: No such file or directory
/app/bin/thinkorswim: line 15: /home/[my home folder]/.var/app/com.tdameritrade.ThinkOrSwim/data/thinkorswim/thinkorswim: No such file or directory

Nothing loads in the GUI at all.

@jkoelker
Copy link
Collaborator

Can you see if the process is running? The sed is trying to fix java window re-homing on wayland, but since its a fresh install, it will fail, but it should still launch the process.

If it is running, then it would appear to be the re-homing issue with java apps, through trial and error I found that on an existing install, editing the workspace and removing the ACCOUNT_MODELS blob works around the issue (which is what the sed tries to do https://github.com/flathub/com.tdameritrade.ThinkOrSwim/blob/master/thinkorswim#L12).

Best I can recommend is to kill the process, and relaunch it a few times, I've found that eventually it will launch and after that the workspace editing trick will get it to launch. Unforts with it being closed source there's nothing I can do about fixing the real issue. I've notified ToS support, you might try the same, but linux and non osx unix variants are technically unsupported by them.

@jmac09
Copy link

jmac09 commented Jun 15, 2022

I have the same issue as vanessakindell.

I check my processes, and I don't have any open SED processes running. It looks like the home directory is not getting set.

Here is my error:


flatpak run com.tdameritrade.ThinkOrSwim
Starting Installer ...
The installation directory has been set to /home/[username]/thinkorswim.
Extracting files ...
Finishing installation ...
sed: can't read /home/[username]/.var/app/com.tdameritrade.ThinkOrSwim/data/thinkorswim/workspace.*.tos.prod.xml: No such file or directory
/app/bin/thinkorswim: line 15: /home/[username]/.var/app/com.tdameritrade.ThinkOrSwim/data/thinkorswim/thinkorswim: No such file or directory

The directory /home/[username]/thinkorswim is not getting created.

I modified my .profile file to include the following and logged out and then back.

export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"}

then I reran:
flatpak run com.tdameritrade.ThinkOrSwim

and got the same error.

In the master sh file (https://github.com/flathub/com.tdameritrade.ThinkOrSwim/blob/master/thinkorswim), I see it is calling
/app/extra/thinkorswim_installer.sh, but I can't find this file anywhere on my system except here:

/var/lib/flatpak/.removed/com.tdameritrade.ThinkOrSwim-e379ba0b5553a7760357b0379f8b3597940b316417236f175606ea7173b7bf87/files/extra/thinkorswim_installer.sh
/var/lib/flatpak/app/com.tdameritrade.ThinkOrSwim/x86_64/stable/e379ba0b5553a7760357b0379f8b3597940b316417236f175606ea7173b7bf87/files/extra/thinkorswim_installer.sh

@jkoelker
Copy link
Collaborator

sed is the process that is ending with the error, it will be a java process and look something like:

/app/jre/bin/java -Dinstall4j.jvmDir=/app/jre -Dexe4j.moduleName=/home/jkoelker/.var/app/com.tdameritrade.ThinkOrSwim/data/thinkorswim/thinkorswim

@vanessakindell
Copy link
Author

vanessakindell commented Jun 29, 2022

I found a workaround: The whole issue is that the program wasn't given the home folder filesystem access. All you have to do to get it working is install FlatSeal and change that setting and it works.

Tested under Pop! OS and Linux Mint.

@tidux
Copy link

tidux commented Aug 12, 2022

The workaround via Flatseal does not work on Fedora 36.

@jmac09
Copy link

jmac09 commented Aug 21, 2022

Hi Vanessa, what exactly did you do in Flatseal to get thinkorswim to run on flatpak? Under the TOS app in flatseal, i went to filesystem and toggled on filesystem=home, but TOS still didn't work.

Thanks,
Jason

@kinghat
Copy link

kinghat commented Aug 25, 2022

same issue on manjaro stable channel.

@eli-xciv
Copy link

eli-xciv commented Sep 12, 2022

For everyone who wants to run this flatpak and is running into this issue. There seems to be a disconnect at the installer where the thinkorswim script adds the -dir.

I was able to handjam the install for the flatpak; testing on Fedora 36

# You may need to install a run time for this work.
flatpak install org.freedesktop.Sdk//20.08

flatpak run --command=sh  com.tdameritrade.ThinkOrSwim

# Run the installer 
sh /app/extra/thinkorswim_installer.sh

exit
flatpak run com.tdameritrade.ThinkOrSwim

This installer will give you a prompt, during the installation on where to install TOS.
enter /home/<your_username>/.var/app/com.tdameritrade.ThinkOrSwim/data/thinkorswim

Once it's installed into the app, it'll run normally every flatpak run after.

@rohsaurus
Copy link

rohsaurus commented Sep 15, 2022

After doing the config change with flatseal, I then had to open up thinkorswim manually using the terminal. I went to where it was installed (in my case ~/thinkorswim) and just ran ./thinkorswim. I let it do its updates, and after closing and restarting a few times, the desktop shortcut worked for me. However, it doesn't work through the pop os launcher or dock.

@SaltyCybernaut
Copy link

I was able to get the TOS Flatpak working on Pop!_OS 22.04 LTS by following the steps below. I believe the root cause is that the installer script thinkorswim_installer.sh and the executable bundled inside the script assume different defaults for the installation directory.

Install the TOS Flatpak

flatpak install com.tdameritrade.ThinkOrSwim
note: I installed this as a 'user' Flatpak (option 2 for me)

Attempt to run TOS and watch it fail

flatpak run com.tdameritrade.ThinkOrSwim

Starting Installer ...
The installation directory has been set to /home/<your_user_directory>/thinkorswim.
Extracting files ...
Finishing installation ...
sed: can't read /home/<your_user_directory>/.var/app/com.tdameritrade.ThinkOrSwim/data/thinkorswim/workspace.*.tos.prod.xml: No such file or directory
/app/bin/thinkorswim: line 15: /home/<your_user_directory>/.var/app/com.tdameritrade.ThinkOrSwim/data/thinkorswim/>thinkorswim: No such file or directory
The installation directory being set to /home/<your_user_directory>/thinkorswim is why it fails.

Give TOS access to your home folder using FlatSeal (this might be optional)

temp

Enter the TOS 'container'

flatpak run --command=sh com.tdameritrade.ThinkOrSwim

Run the TOS installer

sh /app/extra/thinkorswim_installer.sh

Choose a custom installation

temp2

Set the installation directory to /home/<your_user_directory>/.var/app/com.tdameritrade.ThinkOrSwim/data/thinkorswim

temp3

Exit the TOS 'container'

exit

Start TOS from the GUI or Terminal

flatpak run com.tdameritrade.ThinkOrSwim

@uberscientist
Copy link

@SaltyCybernaut great write up, I didn't have to do the FlatSeal permission changing since it should only be touching the flatpak 'container' dir that needs to be updated, dunno how this issue isn't an issue for others!

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

No branches or pull requests

9 participants