Cumulocity-IoT / cumulocity-app-builder

The Application Builder for Cumulocity provides a simple, coding-free way to create new applications inside Cumulocity. Application Builder is an open-source tool for you to create web applications in a no-code environment. Created by Global Presales.
Apache License 2.0
16 stars 6 forks source link

[SOLVED] I am receiving a unauthorized error and being force to logout after upgrading app-builder with custom version #96

Closed mboarettoPIQ closed 1 year ago

mboarettoPIQ commented 1 year ago

I develop some changes of the custom version to allow me to change more css elements on the styling page.

I upload the new version to cumulocity app-builder tenant, and the old applications that were build with the old version let's say the 2.0.0 does not receive the modifications on the new version, let's call it 2.0.1.

If I made a simple tweak on the application configuration, e.g. application icon, while have the 2.0.1 version of app-builder as active. Whenever I tried to reach the same application, I am force to logout with a 401 Unauthorized Http error.

image

image

So, in order to make my current applications work the custom verison of app builder I must duplicate them using the 2.0.1 version, and fix all bugs related to app cloning. It takes a lot of time.

I want to know if there is a way that I can create my custom verison of app builder, and only update the custom builder app, without having to duplicate all my current apps with the new version of the builder.

OBS: aside from my company tenant I have a free trial tenant, on the free trial the custom app-builder version behaves the way that I want.

DarpanLalani commented 1 year ago

Hi,

If i understood correctly, If you have created your App with contextPath (while creating app you will get option), then it will run in its own context. Therefore whenever you deploy new version of your custom app builder, those are not applied to existing app.

I would suggest, you clone your existing app(without context path) and your changes will reflect there.

For error, i guess you changed context path of application builder in package.json ( "contextPath": "app-builder").

mboarettoPIQ commented 1 year ago

Hi Darpan Thanks for the reply, I currently cloning all my applications as you mentioned above.

It seems to work fine right now. However I am facing some issues when cloning my applications and it takes me a while to left my cloned applications up and running.

Is is possible to apply changes on app-builder, without the need of cloning apps?

DarpanLalani commented 1 year ago

Its not possible since we don't have direct access to binary of app which is created with context-path. However, once you bring your app into app-builder context path, your changes will reflect in your app. Here are steps to bring your app into app-builder context path:

Now you can do your changes in app builder and it will reflect in your app

mboarettoPIQ commented 1 year ago

Hi Darpan, Thanks for the reply.

I've tried the steps that you suggested on previous post, and it worked! The changes are being reflected on new apps and the new dashboards are working 100%

Cloning an existent app without context-path really did the trick to me.

I appreciate the help.