Switching targets does not reset global providers

Is anybody having trouble with globals not being reset when switching targets using 4.5.1?

Typically the db, etc get adjusted when switching targets, but I just pushed to staging and it had the development db, thus breaking the entire app.

Wappler Version : 4.5.1
Operating System : mac intel
Server Model: node
Database Type:
Hosting Type:

Expected behavior

The global providers such as db connections should be set properly when switching targets.

Actual behavior

The global providers are not set.

How to reproduce

I updated inline to 4.5.1, updated the project files and then when about working in a development target.

When time to push to staging, I switched targets and published. The site broke because it was using the development credentials for the db.

I noticed in switching targets that the files reported as changed in git did not change, whereas they typically do.

I reverted to 4.5.0 and pushed to staging again, all worked as usual.

I did a full install of the downloaded 4.5.1 and the bug happened again.

@George can you have a look, if confirmed this is obviously is a very significant issue.

oops sorry - seems for nodeJS the switch target code that copies the different db connections got disabled in an optimization. Will enable it again in the next update.

Looks like it’ll be fixed but yes - have experienced weird things yesterday, suddenly being connected to the production db after switching from prod to dev.

@George If a hotfix is possible it would save a lot of frustration next week :wink:

Yes please a hotfix would be nice. It’s a long process to make sure everything works when changing from dev to live target

Unfortunately we can’t issue a hotfix as the whole Wappler needs to be updated.

So hope you can handle the inconvenience for a few days.

Fixed in Wappler 4.5.2

@mebeingken @htatd @karh Was the issue solved for you with this latest update?

Yes

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