*What are the reproduction steps?
I have set up Plasmic Studio locally. Running over http:
yarn dev to get up the studio , I am able to login and see the home page of Plasmic Studio. But when I try to click on New project, or select an existing project , I get SSL errors while it’s trying to load loadsh.js , lib-router.js etc . (strict-origin-when-cross-origin)
What I’ve noticed is the first time the home page loads , all these files are loaded over http and it loads fine.
But when I click on create new project or click on an existing project , then the file studio.js tries to load over https which I think is causing the issue.
I am running Plasmic Studio inside a VM . Using http protocol in the browser URL . Home page or the Project creation page loads fine . All calls to scripts such as loadash , normalize.css , react.js. , router.js. etc are happening over http. When I select a project, all the calls are happening thru HTTPS. Why is this happening ?
is the code written in such a way that we should not do self hoisting in a VM ? Do we need to pay plasmic for this ? Can you pls answer these questions.
Hey @bharath_bhat, there is no restriction on where the code can be ran.
The script you said that is loading this data is the index.html in /platform/wab/public/. Can you check where exactly is the issue happening on the file?
One of the reasons that it is trying to use HTTPS is because it believes it is running in production mode.
Hi , thanks for the reply , The scripts are loaded in the file studio.js.template . This is basically what its doing.
const __plasmicHtml = __plasmicData.html;
let finalHtml = __plasmicHtml;
// Overwrite the entire document.
doc.open();
doc.write(finalHtml);
doc.close();
And this code is basically trying to load some some scripts which in return is throwing SSL errors over the network tab.
Mode is not production , i am able to access plasmic project listing page via http://{ip}:3003 , only when I click on create a new project , I am getting this error.
And the scripts got loaded fine, but started getting error in this call
http://{ip}:3003/api/v1/auth/csrf
So I felt im doing something wrong by replacing the scripts .
So what am I doing wrong ? What might be the fix ? As per my understanding , plasmic should not try to load the scripts via https when im in dev mode and running over http
Digging lil more into it , from where __plasmicData is actually coming from , I find this file , studio-html-plugin.ts . which is doing may things , hardcoded https , like below which might be causing the issue ?
All other calls are happening over http . The final script call which is being done by studio.js file , is happening over https . Does this debug information answer your question?
Hi , How do we run this Plasmic Studio in production mode ? If im running this in dev mode , im getting CORS , and wss(rsbuild HMR) errors. Does plasmic use wss in production mode ?