giyu
giyu
WWindmill
Created by giyu on 2/10/2025 in #help
Issue with Extracting HTTP Cookies for Google Login and Logout Functionality - Video Attached
Hey guys, I am encountering an issue with extracting HTTP cookies within my Windmill app. I've attached a short video demonstrating the problem: Successful Google Login: As you can see in the video at [00:00:00 - 00:00:22], the "Sign in With Google" functionality is working correctly. Upon successful authentication, the application sets an HTTP-only cookie named sharpesense_session_id in the browser. This cookie is visible in the browser's developer tools under the "Application" tab, as shown in the video. Logout Implementation Issue (00:00:23 - 00:00:40): I am now trying to implement a logout feature. The goal is to invalidate the sharpesense_session_id cookie on the backend when the user clicks "Logout". To achieve this, I need to extract the sharpesense_session_id cookie from the request sent to my backend logout route. Problem: No Cookies Found in Logout Request (00:00:25 - 00:00:40): However, as demonstrated in the video, when I trigger the logout route, the backend function reports "No cookies found in the request." despite the cookie being present in the browser and expected to be sent with the request. What I've Tried (code snippet in video 00:00:44 - 00:00:48): In my Windmill Python script for the logout route, I'm attempting to extract the cookie from the request headers. The code, which I will share as a file The sharpesense_session_id cookie is correctly set by the login process. The cookie should be sent with the request to the /logout route. However, my backend logic in Windmill (as shown in the video) is unable to extract the cookie from the request headers, and I receive the "No cookies found in the request." message. Could you please provide guidance on how to correctly extract an HTTP-only cookie like sharpesense_session_id from the browser request within a Windmill backend script? I need to access this cookie to properly implement the logout functionality. Thank you for your time and assistance.
7 replies
WWindmill
Created by giyu on 12/23/2024 in #help
Hide frontend components
No description
1 replies
WWindmill
Created by giyu on 12/19/2024 in #help
Issue with button functionality working in preview mode but not in deployed mode
Hey guys, I’ve encountered an issue where functionality that works correctly in the preview/draft mode does not seem to work once the application is deployed. In the preview mode, when I press the “Press me” button, it properly marks all checkboxes in the AG Grid component named “c” as ready for review. However, after deploying the application, pressing the same button no longer updates the checkboxes as expected. I’ve attached a video that demonstrates the difference in behavior between the preview and deployed environments. Here is a summary of what I’m experiencing: • In draft/preview mode: • Clicking the “Press me” button results in all checkboxes in the “c” grid being marked as ready for review. • In deployed/production mode: • Clicking the “Press me” button does not update the checkboxes, even though the same code is running. I’ve verified that the code logs and set operations are occurring as intended in preview mode, but in the production environment, the console logs do not appear to show the same output (only “Frontend job started w” is logged). Could you please help investigate why this discrepancy occurs between the preview and deployed modes? Any guidance on how to ensure console logs and the AG Grid updates are visible and functioning correctly in production would be greatly appreciated. Thank you for your assistance.
7 replies
WWindmill
Created by giyu on 12/7/2024 in #help
Windmill Worker Chromium Installation Failure
Hi guys, wanted to see if anyone else had this issue. I am using the standard docker-compose.yml for chromium workers but get this issue. ExecutionErr: ExitCode: 100, last log lines: r been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: chromium : Depends: libc++1-19 (>= 1:19.1.4) but it is not installable Depends: libc++abi1-19 (>= 1:19.1.4) but it is not installable Depends: libunwind-19 (>= 1:19.1.4) but it is not installable Depends: chromium-common (= 131.0.6778.108-1~deb12u1) but it is not going to be installed Recommends: chromium-sandbox but it is not going to be installed E: Unable to correct problems, you have held broken packages. The Windmill worker is failing to run properly due to unmet Chromium dependencies on Debian 12 (indicated by ~deb12u1 in package version). Error Details Attempting to install Chromium results in dependency resolution failures. The following dependencies cannot be installed: libc++1-19 (≥ 1:19.1.4) libc++abi1-19 (≥ 1:19.1.4) libunwind-19 (≥ 1:19.1.4) chromium-common (= 131.0.6778.108-1~deb12u1) chromium-sandbox Error Message CopyExecutionErr: ExitCode: 100 Unable to correct problems, you have held broken packages. Expected Behavior Chromium should install successfully with all dependencies resolved, allowing the Windmill worker to function properly. System Information Operating System: Debian 12 (inferred from package versions) Chromium Version: 131.0.6778.108-1 Additional Notes The error suggests there might be held packages preventing proper dependency resolution. This could be due to: Conflicting package versions in the system Missing or incompatible repository sources Previous failed installations leaving the package system in an inconsistent state
1 replies
WWindmill
Created by giyu on 11/26/2024 in #help
Support for HTTP Browser Redirects in Windmill Functions (302 Response Handling)
Hey guys, I'm trying to implement URL redirects through a Windmill TypeScript function. Specifically, I want to create an endpoint that, when accessed through a browser, redirects the user to another URL (in my test case, to Google.com). Current behavior: When I create a TypeScript function that returns redirect information like: typescriptCopyexport async function main() { return { status: 302, headers: { 'Location': 'https://www.google.com' } }; } And access it via GET request (using the sync -> GET by path method), it returns the JSON response: jsonCopy{"status": 302, "headers": {"Location": "https://www.google.com"}} instead of actually redirecting the browser. I've also tried: - Returning HTML content with meta refresh or JavaScript redirect - Using data:URL approach with base64 encoded HTML - Setting different Content-Type headers However, all attempts result in the JSON being displayed rather than the browser being redirected. My question: Is it possible to configure Windmill functions to handle proper HTTP redirects (302 status codes) when accessed directly via browser, rather than just returning JSON? Or is there a recommended pattern for implementing URL redirects in Windmill? This functionality would be particularly useful for implementing features like: - Email click tracking with redirects - OAuth callback handlers - Short URL services Any scenario where users need to be redirected through a Windmill endpoint Technical goal: When a user clicks a link to my Windmill endpoint, their browser should automatically redirect to the destination URL, rather than displaying the JSON response.
13 replies
WWindmill
Created by giyu on 11/23/2024 in #help
Is there a way to pass a context variable into database studio?
No description
1 replies
WWindmill
Created by giyu on 11/18/2024 in #help
Voice Recorder on Python
No description
2 replies
WWindmill
Created by giyu on 11/16/2024 in #help
[FIXED] Windmill Database Studio Type Conversion Issue
No description
7 replies