S3 Upload component fails after signing

I'm getting this error message in console.

Access to fetch at [signedurl] from origin [my retool domain] has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

My resource connection is perfect because I tested the resource connection and also used a query to list files in bucket using the same resource. But when i try to upload a file, it fails and I get that message in console.

Hey @Nasirullah!

Are you seeing this error when using Upload data action type or are you using the Generate a signed url action and then uploading the file from a JS query or custom component?

If you wouldn't mind sharing how you have CORS configured on your bucket that may be helpful here as well :thinking:

@Kabirdas I totally forgot I put this out. It is now working as expected.
There was an issue with CORS policy.

Between, how do I deploy my apps? I'm done with the version I'm currently building and I need to deploy the internal tool for use, unfortunately all the articles I have read did not talk about deployment using Retool's permission groups, if I use the public mode in share options my app is available without user authentication, I'm using the default retool auth. This is quite urgent, I tried to join Office Hours yesterday to get more details on this, but missed I it.

The default way is to grant a permission group access and then make sure anybody who should be using the app is part of that group. There's some documentation on that here - is that what you were already looking at?

The dev team has been looking at making some updates to the permissions model and with Retool Embed there are already additional ways to share apps outside of public apps. Would you mind sharing more about how you'd like to share the apps? Are the people you're looking to share with already members of your Retool organization?

And glad to hear the original issue was fixed! :slightly_smiling_face: Sorry that you weren't able to make it to office hours!

@Kabirdas
Yes I found out a little trick, I had to enable use permission to disable the headers and footers shown when viewing the apps, but there is a problem, we need to have a separate link for staging environment because the internal tool has three user classes split into various permission groups. The dev group for instance only needs the staging environment so they can troubleshoot problems that occur when writing code and testing the main offering of the company, so they come to the tool to unblock themselves. But for production environment we have sales and support groups who need access to production environment which is the default for retool, but it would be interesting to remove app uuid from the url to they can easily change the url for navigating to pages, believing that they have little technical know-how on how this works.

So it will be very helpful if i can link the environment to the url like this
For staging environment https://staging.<org_url>/apps_link
Similarly for production there won't be an additional subdomain to the basd org url, like Retool

Also, I really don't understand the embed docs, i was thinking it will solve my problem but i don't understand after step 2, am i to create a separate website and then embed retool apps in those? Will the navigation component still work as expected?

Then using the navigation component i have a dropdown on the nav, i allowed a user group to access only one of the applications in that dropdown and now I can't see that block in the navigation side bar again, but it works in other cases. I jut click the drop-down and click the app i want to navigate, but this certain dropdown is not showing at all.

Hey @Nasirullah!

You should be able to link direclty to https://yoursubdomain.retool.com/apps/yourAppName and it will redirect to the URL containing the app UUID, could that work for your use case?

Beyond that, the only way, at the moment, to link to specific environments is by using the _environment URL parameter (docs) e.g. https://yoursubdomain.retool.com/apps/yourAppName?_environment=staging.

Retool Embed is specifically for embedding Retool in a separate website you host. However, if you're on the Business or Enterprise plans you can configure a custom domain for your instance as well without necessarily needing to use Retool Embed.

Finally, to clarify, is the navigation component not working for users with limited permissions? The nav bar should read the permissions of the user and only show those apps which they have access to. Would you mind sharing screenshots or a video of what you're describing?

Thank you @Kabirdas
Yes, linking directly to https://yoursubdomain.retool.com/apps/yourAppName and it redirecting to the URL containing the app UUID, would work for my use case. I tried it now and it's working.

Okay, I will just have to work with this _environment, for link to specific environments for now, but is there any way I can configure it to work for staging and other environments except for production?

Yes, I'm on business plan so I may as well tryout configuring a custom domain.

For the navigation component, yes it does not work as expected for users with limited permissions only, because when I group multiple apps under one navigation block and i restrict access to all of the grouped apps except one it works if the app they can access is the first in the nested group but does, not work otherwise. I found a way around which is to set the default navigation block to the app the user group can access then nesting a group of apps under it which removes the navigation from the block so now they can see it. When the user is in that group.

Also, another problem I have this week, is that I'm unable to add ChartJS to my Retool Apps. Is it that Retool does not support it yet?

is there any way I can configure it to work for staging and other environments except for production?

Not at the moment, unfortunately. Permissions and other restrictions to environments is a pretty heavily requested feature and something the dev team is aware of though.

For the navigation component, yes it does not work as expected for users with limited permissions only, because when I group multiple apps under one navigation block and i restrict access to all of the grouped apps except one it works if the app they can access is the first in the nested group but does, not work otherwise. I found a way around which is to set the default navigation block to the app the user group can access then nesting a group of apps under it which removes the navigation from the block so now they can see it. When the user is in that group.

Thanks for clarifying the behavior of the navigation component as well! I'll see if I can reproduce the behavior from what you've described and pass the feedback along.

Also, another problem I have this week, is that I'm unable to add ChartJS to my Retool Apps. Is it that Retool does not support it yet?

What URL are you using to import the ChartJS library and how are you looking to use it? Retool typically requires that you use a UMD build. This one seems to work well with a custom component:

https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.3.0/chart.umd.min.js

Here's a JSON example that you can import!
chartjs.json (6.0 KB)

Not at the moment, unfortunately. Permissions and other restrictions to environments is a pretty heavily requested feature and something the dev team is aware of though.

Okay, I guess we will just make do with this. Will be on the lookout when the feature is shipped and I will love to get early access when it's shipped.

Thanks for clarifying the behavior of the navigation component as well! I'll see if I can reproduce the behavior from what you've described and pass the feedback along.

You're welcome.

What URL are you using to import the ChartJS library and how are you looking to use it? Retool typically requires that you use a UMD build. This one seems to work well with a custom component:
https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.3.0/chart.umd.min.js

Thank you for this. I wasn't using the UMD build, hence the problem.