Problems with routing on mobile app using Bootstrap 5

I think we found the problem.
Please move the following include:

<script src="js/routes.js" defer></script>

AFTER:

<script src="dmxAppConnect/dmxRouting/dmxRouting.js" defer></script>

this should fix your issue.

Not solved in my case, another order I can try?

<head>
	<script src="dmxAppConnect/dmxAppConnect.js"></script>
	<meta charset="UTF-8">
	<title>Untitled Document</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="stylesheet" href="bootstrap/5/css/bootstrap.min.css" />
	<script src="dmxAppConnect/dmxRouting/dmxRouting.js" defer></script>
	<script src="dmxAppConnect/dmxBootstrap5Navigation/dmxBootstrap5Navigation.js" defer></script>
	<script src="js/routes.js" defer></script>
</head>

Not sure what your issue is exactly, but i was able to recreate the issue reported by @daves88 and it was caused by the order of the includes. It will be fixed also in the next update.
If you have a different issue, please report it in a different topic.

Well, this reported issue…
In my case, changing the order of the includes, works on AC1, but not on AC2

Sorry @Teodor, seems I forget about internal option using AC2.

Saying that, AC1 (or old dmxrouting.js) works fine without internal option.

image

So that was the confusion.

Sorry again and thanks for the fix :raised_hands:t2:

THANK YOU this did indeed solve the problem! Only issue left is when I type in url http://localhost:52660/ it says: File /Users/david/Desktop/mobiletest/www/ not found.

I have setup in routing my ‘home’ page to go to /

You could try making / the first route in the routing structure (drag it to the top) and see if that resolves the issue @daves88? Could also try changing URL to Page?

Like such:

Screenshot from 2024-04-24 22-03-28

Nop still not working

Was worth a shot!

Thanks, will have to post this as a new bug

Another idea… Maybe rename the page index.html rather than home.html? Don’t forget to check the route at the bottom of the page is updated to reflect the changes to the route.

I found this from ben…

Which has sense, maybe you should not worry about that, capacitor will load on localhost only


image

Both images comes from android studio

Also, this is from the capacitor team

the problem is that the default behavior of the “local server” is to append the index.html

And there’s an open feature request about this:

:ok_hand:so I guess the app always has to start with index.html. So what exactly happens when you set home page route to / ? What’s the purpose of doing that? Also, how do set the iOS or android app to load index.html first?

I don’t know how explain it in a technical way, but is like:
When you set / on home page, you are defining index.html as a main page and load home as content page on init, or something like that :laughing:

When you click the build button, all happens automatically.

Just a friendly advice, don’t try to run the emulator on the first try.

After created your app, click the build option, open android studio/xcode (there’s a button on the bottom) and install all dependencies there as it will start downloading them.
After doing all that and no errors on logs, then you can start using Wappler to preview, using the emulator…

1 Like

Thank you :pray:

Fixed in Wappler 6.5.2

This topic was automatically closed after 47 hours. New replies are no longer allowed.