Open hellocatfood opened 9 months ago
Did you create the Story inside Twine or did you open it separately? I just tested it locally with Firefox in flatpak and a story create in Twine it seems to work flawless.
I could imagine that you use a portal to open the story, which would explain the path. If you go ahead and use a tool like flatseal to share the directory of your story or put it at $(xdg-user-dir DOCUMENTS)/Twine
, this should work :)
Does this only work with the version of Firefox from Flathub?
I have tested this with the firefox snap that comes with Ubuntu 23.10.
I'm also confirming that running Play or Test does not work in this flatpak. I've tried giving the app additional permissions as the -v
output quoted some failures without session bus access. Still this didn't work. Nothing pops up in any browser and my Fedora 40 (Gnome).
Are you storing your games in $(xdg-user-dir DOCUMENTS)/Twine
or do you open them from a different directory?
Because if you use a different directory, this could explain the problem. As the game is opened, it is passed through the portal. not directly accessed. As a result the file the test command points to would start with $XDG_RUNTIME_DIR
(usually something like /run/user/1000
) and point to a file that doesn't exist outside of the context of the flatpak.
You should be able to test it by creating a new project, since these are automatically stored under $(xdg-user-dir DOCUMENTS)/Twine
.
Are you storing your games in
$(xdg-user-dir DOCUMENTS)/Twine
or do you open them from a different directory?Because if you use a different directory, this could explain the problem. As the game is opened, it is passed through the portal. not directly accessed. As a result the file the test command points to would start with
$XDG_RUNTIME_DIR
(usually something like/run/user/1000
) and point to a file that doesn't exist outside of the context of the flatpak.You should be able to test it by creating a new project, since these are automatically stored under
$(xdg-user-dir DOCUMENTS)/Twine
.
Okay, yes, I did as you described and hit "New"
However, when I created "Test" and hit play, nothing happens:
Here's output from running the program in -v
:
bhibb@fedora ~> flatpak run -v org.twinery.Twine
F: No installations directory in /etc/flatpak/installations.d. Skipping
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/bhibb/.local/share/flatpak
F: Opening user flatpak installation at path /home/bhibb/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
F: Opening user flatpak installation at path /home/bhibb/.local/share/flatpak
F: Opening system flatpak installation at path /var/lib/flatpak
F: /var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/23.08/64a85d9703e16a360fb65aeb40382183be68836567e2a3a9455f70b2a26a568f/files/lib32 does not exist
F: Cleaning up unused container id 390521381
F: Cleaning up per-app-ID state for org.twinery.Twine
F: Cleaning up unused container id 2684870551
F: Cleaning up per-app-ID state for org.twinery.Twine
F: Cleaning up unused container id 2966659455
F: Allocated instance id 3126993654
F: Add defaults in dir /org/twinery/Twine/
F: Add locks in dir /org/twinery/Twine/
F: Allowing dri access
F: Xdg dir xdg-download is $HOME (i.e. disabled), ignoring
F: Xdg dir xdg-documents/Twine is $HOME (i.e. disabled), ignoring
F: Allowing x11 access
F: Running '/usr/bin/bwrap --args 40 -- /usr/bin/xdg-dbus-proxy --args=42'
F: Running '/usr/bin/bwrap --args 40 -- twine-wrapper'
[2:0810/105806.567206:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
App pref backupFolderPath set to undefined
App pref disableHardwareAcceleration set to undefined
App pref scratchFolderPath set to undefined
App pref scratchFileCleanupAge set to undefined
App pref storyLibraryFolderPath set to "/run/user/1000/doc/2d16cc2f/TwineStories"
Gtk-Message: 10:58:06.766: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:58:06.766: Failed to load module "pk-gtk-module"
Gtk-Message: 10:58:06.767: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:58:06.767: Failed to load module "pk-gtk-module"
[2:0810/105806.779377:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0810/105806.779422:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Initializing i18next without locale
Adding i18next translation resources
Getting locale preference
i18next::backendConnector: No backend was added via i18next.use. Will not load resources.
i18next: languageChanged en-us
i18next: initialized {
debug: true,
initImmediate: true,
ns: [ 'translation' ],
defaultNS: [ 'translation' ],
fallbackLng: [ 'en-us' ],
fallbackNS: false,
whitelist: false,
nonExplicitWhitelist: false,
supportedLngs: false,
nonExplicitSupportedLngs: false,
load: 'currentOnly',
preload: false,
simplifyPluralSuffix: true,
keySeparator: '.',
nsSeparator: ':',
pluralSeparator: '_',
contextSeparator: '_',
partialBundledLanguages: false,
saveMissing: false,
updateMissing: false,
saveMissingTo: 'fallback',
saveMissingPlurals: true,
missingKeyHandler: false,
missingInterpolationHandler: false,
postProcess: false,
postProcessPassResolved: false,
returnNull: true,
returnEmptyString: true,
returnObjects: false,
joinArrays: false,
returnedObjectHandler: false,
parseMissingKeyHandler: false,
appendNamespaceToMissingKey: false,
appendNamespaceToCIMode: false,
overloadTranslationOptionHandler: [Function: handle],
interpolation: { escapeValue: false },
lng: 'en-us'
}
Changing i18next language to en-US
i18next::backendConnector: No backend was added via i18next.use. Will not load resources.
i18next: languageChanged en-US
Story library path initialized as /run/user/1000/doc/2d16cc2f/TwineStories
Backing up story library to /home/bhibb/Twine/Backups
Backed up story library to /home/bhibb/Twine/Backups/2024-8-10 10-58-6-800
Error while loading user CSS, skipping: ENOENT: no such file or directory, open '/home/bhibb/Twine/user.css'
[41:0810/105809.962895:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
I think your log shows the issue:
App pref storyLibraryFolderPath set to "/run/user/1000/doc/2d16cc2f/TwineStories"
That path doesn't exist outside of flatpak, not sure where it's set.
That's why I couldn't reproduce the issue on a freshly installed machine:
Story library path initialized as /var/home/testuser/Documents/Twine/Stories
I think if you use flatseal and allow direct access to wherever that directory is on your system, it should work, you might need to reopen your story after providing access.
I've tried to allow this folder, as you instructed, however I remember before I established this directory that it was not working. I've set this directory in Flatseal, yet it still doesn't work:
However I have discovered a workaround. Selecting "all user files" allows the story to play.
When I run
Play
orTest From Here
Firefox opens but the html file is not loaded and just returns the following error:I checked in
/home/$USER/.var/app/org.twinery.Twine
and there doesn't appear to be any html files.