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

Navigation between pages not working in Tauri-generated apps for PC and MAC #1527

Closed
EkaterinaGorbunova opened this issue Apr 18, 2021 · 8 comments
Assignees

Comments

@EkaterinaGorbunova
Copy link

He everyone!

Issue: navigation between pages not working in Tauri-generated apps for PC and MAC.

I am building an app using create-r3f-app and next.js with tailwind css. App does not have any 3D components yet. App has multiple pages and uses AWS backend services (like Cognito User Pool, DynamoDB, S3 etc).
When I run Tauri in dev environment - app works fine - I'm able to log in using AWS Cognito (all pages are protected by Aunthenticator), can jump between pages of the app, all contents are displayed properly.

On PC:
Whenever I generate Tauri bundle (yarn tauri build) - I'm able to log in using AWS Cognito, index.js page is displayed properly but navigation between pages doesn't work and i'm getting the following error:

image

image

If I right-click on "not found file/page" and hit ''Back'', I go back to index.js page.

On MAC:
Everything works fine in the dev environment but when i try to run tauri-generated app (yarn tauri build) - navigation between pages doesn't work and there are no errors in the console. When debugging with 'cargo run tauri --verbose' - i'm getting the following error when trying to jump to another page:

Users-MacBook-Air:src-tauri user1$ cargo run tauri --verbose
   Compiling tauri v1.0.0-beta-rc.0
   Compiling app v0.1.0 (/Users/user1/company/workspace/launcher/src-tauri)
   Compiling tauri-macros v1.0.0-beta-rc.0
    Finished dev [unoptimized + debuginfo] target(s) in 24.98s
     Running target/debug/app tauri --verbose
AssetNotFound("PageName1")
AssetNotFound("PageName2")
AssetNotFound("PageName3")
AssetNotFound("PageName4")
Users-MacBook-Air:src-tauri user1$

Expected behavior:
Be able to jump between pages within Tauri app. Each .js page should display it's content

OS: Windows_NT(10.0.19042) - win32/x64
Node: 14.16.1
NPM: 7.10.0
Yarn: 1.22.10
Rustc: 1.51.0 (2fd73fabe 2021-03-23)

OS: Mac Chip Apple M1
Node: 14.16.1
NPM: 7.10.0
Yarn: 1.22.10
Rustc: 1.51.0 (2fd73fabe 2021-03-23)

@mq1
Copy link

mq1 commented Apr 20, 2021

same affecting my app (ViteJS, VueJS, vue-router, vite-ssg)

@nothingismagick
Copy link
Member

Are you using "history" or "hash" mode?

@mq1
Copy link

mq1 commented Apr 20, 2021

Are you using "history" or "hash" mode?

I think hash, as it seems to be the default. If it helps I'm using https://github.com/antfu/vite-ssg, https://github.com/hannoeru/vite-plugin-pages and https://github.com/JohnCampionJr/vite-plugin-vue-layouts to manage the routes.

@mq1
Copy link

mq1 commented Apr 20, 2021

Ok, the default was History, hash mode doesn't have this problem

@nothingismagick
Copy link
Member

FYI we are tracking this at wry:
tauri-apps/wry#170 (comment)

@lemarier
Copy link
Member

lemarier commented Apr 20, 2021

Part of the bug should be resolved in WRY, now I need to check what's going on with AWS Cognito & nextjs

I'll invest and keep the thread updated.

@lemarier
Copy link
Member

lemarier commented May 4, 2021

Fixed in tauri-apps/wry#173

If you still have this problem with the next release, please open a new issue.

Thanks again for reporting!

@lemarier lemarier closed this as completed May 4, 2021
@EkaterinaGorbunova
Copy link
Author

Hi everyone, i checked it out.
Multi-page links work great in Tauri v.1.0.0-beta.0
Thanks a lot!

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

No branches or pull requests

4 participants