CommPulse

CommPulse

1157 parked Settings

The cross-site community pulse: gold-layer posts + comment threads read live from the Communication Hub, ranked by importance. Turn a post into Discord / LinkedIn / X.

stackexchangestackoverflow:google-cloud-platformView on Stack Exchange

I am deploying a Next.js application using the App Router to an Ubuntu virtual machine on Google Cloud. The deployment is triggered through GitHub Actions whenever code is pushed to the main branch. The workflow successfully pulls the latest code, installs dependencies, creates a production build, and restarts the application with PM2. However, the website sometimes continues showing the previous version even though the GitHub Actions workflow finishes successfully. My deployment commands are similar to: cd /var/www/scallar git fetch origin git reset --hard origin/main npm ci npm run build pm2 restart scallar-app The PM2 application is started using: npm start I have also tried: pm2 delete scallar-app pm2 start npm --name "scallar-app" -- start The repository contains the updated files, and the .next directory has a recent timestamp. Restarting Nginx or manually deleting the .next directory and rebuilding usually fixes the problem. Expected behaviour: Every successful deployment should immediately serve the latest Next.js build. Actual behaviour: The previous build is sometimes served until I manually remove the build directory and restart PM2 or Nginx. What is the correct deployment process for a Next.js application running behind Nginx and PM2? Should the .next directory always be removed before building, and could PM2, Nginx caching, or multiple running Node.js processes be causing the old version to remain active?

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:amazon-web-servicesView on Stack Exchange

I built a project using FastAPI for the backend, Vite for the frontend UI, Next.js for the admin panel, and MySQL as the database. The project is deployed on AWS EC2 with 2 GB RAM and 1 Gunicorn worker . The issue is that when I run the project locally in VS Code using the same MySQL database as the deployed server, everything works perfectly. However, on the AWS server, it does not work properly. The third-party API integrations collect data successfully, but my own APIs, such as login and search history , do not work and eventually return a timeout error .

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:google-cloud-platformView on Stack Exchange

I already implemented the logic for the in app purchases but, it appears it's not being processed at all... here is the code for my app. Is something wrong with my code? I already have my product ids set up and they are active in the play console and when I click on a button to purchase some coins it calls the "_buy_coins_10k() " function. But nothing shows, no purchase window for $0.99 for the 10k Coins I'm on Godot 4 using the Godot Google Play Billing plugin/addon version 3.2.0 extends Node # ============================================================ # SIGNALS # ============================================================ signal products_loaded(products: Array) signal product_granted(product_id: String) signal purchase_flow_started(product_id: String) # ============================================================ # PRODUCT DEFINITIONS (Consumables + Non‑Consumables) # ============================================================ const CONSUMABLES := { "coins_0.99": 10000, "coins_4.99": 60000, "coins_9.99": 150000 } const NON_CONSUMABLES := { "remove_ads": true } func is_consumable(id: String) -> bool: return CONSUMABLES.has(id) func get_reward(id: String) -> int: return CONSUMABLES.get(id, 0) # ============================================================ # INTERNAL STATE # ============================================================ var billing: BillingClient var products_cache := {} var retries := 0 const MAX_RETRIES := 5 # ============================================================ # READY # ============================================================ func _ready(): billing = BillingClient.new() add_child(billing) billing.connected.connect(_on_connected) billing.disconnected.connect(_on_disconnected) billing.query_product_details_response.connect(_on_product_details) billing.on_purchase_updated.connect(_on_purchase_updated) billing.consume_purchase_response.connect(_on_consume) billing.acknowledge_purchase_response.connect(_on_ack) billing.connect_error.connect(_on_connect_error) billing.start_connection() # ============================================================ # CONNECTION + RETRY LOGIC # ============================================================ func _on_connected(): retries = 0 _query_all() func _on_disconnected(): print("[IAP] Disconnected from Google Play.") _retry_connection() func _on_connect_error(code, msg): print("[IAP] Connection error: ", msg) _retry_connection() func _retry_connection(): if retries >= MAX_RETRIES: print("[IAP] Max retries reached. Billing unavailable.") return retries += 1 print("[IAP] Retrying connection (", retries, "/", MAX_RETRIES, ")...") await get_tree().create_timer(1.0).timeout billing.start_connection() # ============================================================ # QUERY PRODUCTS + PURCHASE HISTORY # ============================================================ func _query_all(): var all_ids = CONSUMABLES.keys() + NON_CONSUMABLES.keys() billing.query_product_details(all_ids, BillingClient.ProductType.INAPP) billing.query_purchases(BillingClient.ProductType.INAPP) # ============================================================ # PRODUCT DETAILS RECEIVED # ============================================================ func _on_product_details(response): if response.get("response_code") != BillingClient.BillingResponseCode.OK: print("[IAP] Failed to load product details.") return products_cache.clear() for p in response.get("product_details_list", []): var id = p.get("product_id") products_cache[id] = p print("[IAP] Cached products: ", products_cache.keys()) products_loaded.emit(products_cache.values()) # ============================================================ # PURCHASE FLOW # ============================================================ func buy(id: String): if not billing.is_ready(): print("[IAP] Billing not ready.") return if not products_cache.has(id): print("[IAP] Product not cached: ", id) return purchase_flow_started.emit(id) billing.purchase(id) func _on_purchase_updated(response): if response.get("response_code") != BillingClient.BillingResponseCode.OK: print("[IAP] Purchase failed: ", response.get("response_code")) return for purchase in response.get("purchases_list", []): _process_purchase(purchase) # ============================================================ # PROCESS PURCHASE (Grant → Consume/Acknowledge) # ============================================================ func _process_purchase(purchase: Dictionary): var products: Array = purchase.get("products", []) var token: String = purchase.get("purchase_token", "") var acknowledged: bool = purchase.get("is_acknowledged", false) for id in products: _grant(id) if is_consumable(id): billing.consume_purchase(token) elif not acknowledged: billing.acknowledge_purchase(token) # ============================================================ # GRANT REWARD / ENTITLEMENT # ============================================================ func _grant(id: String): if is_consumable(id): var amount = get_reward(id) GameManager._update_coin_count(amount) SignalsManager.emit_signal("coin_exchange") print("[IAP] Granted ", amount, " coins.") else: print("[IAP] Granted entitlement: ", id) product_granted.emit(id) # ============================================================ # CONSUME / ACK RESPONSES # ============================================================ func _on_consume(response): if response.get("response_code") == BillingClient.BillingResponseCode.OK: print("[IAP] Consumable consumed successfully.") else: print("[IAP] Failed to consume item: ", response.get("response_code")) func _on_ack(response): if response.get("response_code") == BillingClient.BillingResponseCode.OK: print("[IAP] Non‑consumable acknowledged.") else: print("[IAP] Failed to acknowledge item: ", response.get("response_code")) # ==================== func _coins_10k() -> String: return "coins_0.99" func _buy_coins_10k() -> void: buy(_coins_10k())

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:google-cloud-platformView on Stack Exchange

Godot Google Play Billing ( I'm getting this result -> [IAP] Product not cached: coins_0.99 ) I already implemented the logic for the in app purchases but, it appears it's not being processed at all... here is the code for my app. Is something wrong with my code? I already have my product ids set up and they are active in the play console and when I click on a button to purchase some coins it calls the "_buy_coins_10k() " function. But nothing shows, no purchase window for $0.99 for the 10k Coins

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:azureView on Stack Exchange

Azure Foundry agents seem to be using the old Completions API by default. Is it possible to configure it to use the newer Responses API? Here's a test i did: First turn - No KB usage: I set up an agent with a connected Knowledge Base and a connected Memory. However, For this test purposes, I intentionally ask a general question which doesn't require a KB query. Result: success - as can be seen in the below screenshot: Second turn - With KB usage: With the same agent, in a subsequent turn, I ask a question whose answer requires a KB query. This is indeed what happens, and issues an error: Error: An error occurred invoking knowledge_base_retrieve : An error occurred invoking knowledge_base_retrieve : BadRequest Message-{"Message":"Could not complete model action. The model endpoint returned status code \u0027400\u0027 (BadRequest). Function tools with reasoning_effort are not supported for this model in /v1/chat/completions . Please use /v1/responses instead.","DataPlaneErrorCode":0,"DataPlaneErrorDetail":[]} RequestId: a6f6c6f3-85fe-4659-bb0e-103f190e9ae7. Troubleshooting guide: https://learn.microsoft.com/en-us/azure/foundry/agents/how-to/foundry-iq-connect?tabs=foundry%2Cpython#troubleshooting Result: failure - as can be seen in the below screenshot: The error indicates the agent is using the older /v1/chat/completions api, instead of the newer /v1/responses . Is this something I could configure to fix it?

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:amazon-web-servicesView on Stack Exchange

AWS CloudFormation templates provide two intrinsic functions that sound like a perfect match for one another: GetAZs - returns an array that lists Availability Zones for a specified Region ForEach - takes a collection and a fragment, and applies the items in the collection to the identifier in the provided fragment Ostensibly, it should be straightforward to combine these to dynamically create a resource for each Availability Zone in the Region , yet attempting to do so results in the following error from CloudFormation upon deployment: Transform AWS::LanguageExtensions failed with: Could not find a collection or could not be resolved for Fn::ForEach. Rollback requested by user. Caused by this template: AWSTemplateFormatVersion: 2010-09-09 Transform: AWS::LanguageExtensions Resources: Fn::ForEach::Q: - ID - !GetAZs "" - Q&{ID}: Type: AWS::SQS::Queue Conversely, this template works fine and deploys 3 queues as expected: AWSTemplateFormatVersion: 2010-09-09 Transform: AWS::LanguageExtensions Resources: Fn::ForEach::Q: - ID - ["us-east-1a","us-east-1b","us-east-1c"] - Q&{ID}: Type: AWS::SQS::Queue GetAZs is included in the list of functions supported by ForEach , but upon closer inspection, the Collection parameter of ForEach is defined as: The collection of values to iterate over. This can be an array in this parameter, or it can be a Ref to a CommaDelimitedList . GetAZs is indeed defined to return an array in the expected format , but the explicit mention of Ref in the above definition perhaps implies that it is the only function supported within this specific parameter of ForEach? If this is indeed the case, is there a way to get CloudFormation to do what I want? Namely, deploy a resource for each Availability Zone within a Region, without hardcoding the zones myself, and regardless of how many Availability Zones may exist?

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:google-cloud-platformView on Stack Exchange

Yesterday, my Firebase database was suspended due to "Suspension of your Google Cloud Platform/API because it engaged in abusive activity consistent with hijacked resources." Until the database is reinstated, no one can use my app because the backend is completely unavailable. I want to make sure this type of suspension never happens again. I also want to prepare a disaster recovery plan so that, if Google suspends my Firebase project again, my application can continue working with minimal downtime. I have the following questions: 1. Independent Backup and Disaster Recovery Currently, I have Firebase and Google Cloud disaster recovery options, but if Google suspends my project, I cannot even access those backups because the entire project is suspended. As a solution, I am thinking of creating a separate backup system outside Google Cloud. My idea is: Create a script or service that runs on my own VPS. Every day, automatically back up all Firestore data to a completely separate database. Store the backups independently so they are still available even if my Firebase project is suspended. I also need to back up: Firebase Authentication (users and authentication data) Firebase Storage (uploaded files) My questions are: Is this architecture possible? How can I securely access Firebase Authentication data and store it in another database? How can I back up Firebase Storage files? Can I download them using signed URLs or another secure method? What is the recommended approach for implementing this entire backup system? 2. Switching to the Backup Database Without an App Update If my original Firebase project is suspended again, I want my Flutter app to connect to the backup database until Google reinstates the original project. My concern is that most users do not update the app immediately. My questions are: Is it possible to switch the backend from the original Firebase project to the backup server without requiring users to update the app? If it is possible, what is the recommended architecture? If it is not possible, what is the best approach using an app update? What disaster recovery strategy would you recommend for Flutter applications? 3. Protecting Firebase Service Account Credentials I believe my Firebase project may have been suspended because my Firebase service account JSON file (used for sending FCM notifications) was leaked. Previously, I stored the service account JSON file inside my Flutter project's assets folder. Although I enabled ProGuard/R8 code obfuscation to make reverse engineering more difficult, I now realize that the file can still be extracted from the APK. I researched this issue and received different advice: ChatGPT suggested that hardcoding the credentials in the application with code obfuscation provides some protection. Claude AI recommended never storing the service account in the app. Instead, it suggested keeping it on Cloud Functions or on a separate VPS and sending notifications from the backend. Based on your experience: Which approach is the most secure? Is using Cloud Functions better than hosting the credentials on a VPS? Is there an even better architecture than either of these approaches? What is the industry best practice for securely sending FCM notifications while preventing service account credential leaks? I would appreciate your recommendations and any additional security best practices to ensure that this type of suspension never happens again.

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:google-cloud-platformView on Stack Exchange

My Google Cloud/Firebase project has been suspended with the following message: Immediate action required: Suspension of your Google Cloud Platform/API project because it was engaged in abusive activity consistent with hijacked resources. I have already submitted an appeal today, but I wanted to know if anyone has experienced something similar. My situation My application has been running in production for about 1 year . The last release was around 3 months ago . There were no major changes before the suspension. Suddenly I received the suspension email. Now I cannot access the Google Cloud Console because it always redirects me to the Request an Appeal page. In Firebase Console, Firestore and Storage no longer show my existing resources. Instead, they show "Create Firestore Database" and "Create Storage" as if the project is empty. My application has completely stopped working because it cannot access Firestore. What I discovered While reviewing Firebase Users & Permissions before the suspension, I found an Editor account that my team never added . [email protected] We immediately removed this account. Because of this, I suspect the project may have been compromised. Backups Fortunately, I have Firestore Disaster Recovery backups enabled, but since the project is suspended I cannot access them. My questions Has anyone had a project restored after submitting an appeal? After restoration, was your Firestore database still available? Were your Firestore Disaster Recovery backups still accessible? Since I submitted my appeal today (Friday), should I simply wait until Monday or Tuesday? If Google restores the project, what should I do first? Export Firestore? Rotate service account keys? Generate new API keys? Review IAM permissions? Check Audit Logs? Any advice from someone who has recovered from this situation would be greatly appreciated.

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:google-cloud-platformView on Stack Exchange

I have a Google Cloud project (`788197426562`) for which access to the Business Profile API ("Basic API Access", requested via`support.google.com/business/contact/api_default`) has already been approved. As a result, calls to `mybusinessbusinessinformation.googleapis.com` (location hours) and`mybusinessaccountmanagement.googleapis.com` (list of accounts/locations) work perfectly with a valid OAuth2 token (scope `business.manage`). To fetch customer reviews, I'm calling the legacy v4 API: GET https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews This call consistently returns: { "error": { "code": 403, "status": "PERMISSION_DENIED", "details": [{ "reason": "SERVICE_DISABLED", "message": "Google My Business API has not been used in project 788197426562 before or it is disabled." }] } } What I've tried : 1. Clicking the activation link provided in the error message (`console.developers.google.com/apis/api/mybusiness.googleapis.com/overview`) → the page fails to load ("Failed to load"). 2. Enabling the service directly via the gcloud CLI (in Cloud Shell, authenticated as the project owner): gcloud services enable mybusiness.googleapis.com --project=788197426562 → denied: ERROR: (gcloud.services.enable) PERMISSION_DENIED: Permission denied to enable service [mybusiness.googleapis.com] reason: AUTH_PERMISSION_DENIED domain: serviceusage.googleapis.com 3. Re-submitting an access request through the official form (`support.google.com/business/contact/api_default`, "Application for Basic API Access") → automatically rejected: > You can only add one project per business to the allow list. Project number > 788197426562 is already on the allow list. That last message suggests the "Business Profile API" access (the modern group of 8 APIs) is indeed approved for this project, but the legacy v4 API (reviews) is gated by a separate allow list that this approval doesn't cover — and the form has no way to submit a targeted request for that specific piece. Question : Is there a way (endpoint, form, or support channel) to request access specifically to `mybusiness.googleapis.com` v4 (the `accounts.locations.reviews` endpoint) when the project is already approved for the rest of the Business Profile API? The generic form treats any new submission as a duplicate and auto-rejects it without ever routing the actual request.

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:azureView on Stack Exchange

I'm hosting a website with GitHub Pages, and I would like to authenticate the user using Microsoft Entra for Azure Functions. I started off using Microsoft Quick Authentication to get the user authenticated. I registered the app the Microsoft Entra and added it as a redirect URI. So far, this is working fine -- the user can sign in. Then, I have my Azure Function protected with Authentication. The Identity Provider is Microsoft, and I currently have it connected Microsoft Entra app registration for the GitHub Page. I plan to call this Function in the Javascript of the GitHub Page. So far, I attempted a simple fetch() for the Function, but I got a 401 Unauthenticated Response which I configured in Azure. So, the user's authentication is not being passed to the Function. I thought it would be included as a cookie . Since the browser is not automatically passing the authentication cookie, how can I pass the user's authentication to the Azure Function?

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:google-cloud-platformView on Stack Exchange

My application requires the following permission https://www.googleapis.com/auth/youtube.force-ssl, https://www.googleapis.com/auth/youtube, https://www.googleapis.com/auth/youtubepartner, https://www.googleapis.com/auth/youtube.upload, https://www.googleapis.com/auth/drive.file My code requests these permissions in one OAuth call. It has been working fine for the last year, starting yesterday it no longer works, and I get this error: This request contains scopes that cannot be requested together : [https://www.googleapis.com/auth/youtube.force-ssl, https://www.googleapis.com/auth/youtube, https://www.googleapis.com/auth/youtubepartner, https://www.googleapis.com/auth/youtube.upload, https://www.googleapis.com/auth/drive.file] If you are a developer of Teamthy, see error details. Error 400: invalid_request Why is that? Why does it suddenly stop working?

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:azureView on Stack Exchange

We are using Guest Configuration assignments via the Azure Guest extension to apply changes inside our VMs. Everything has been working fine until now, but I've run into an issue. When we update the contentUri in policy (for example, bumping the version from 1.0.0 to 1.0.1 ), all new VMs correctly receive guest assignments with version 1.0.1 . However, existing VMs that are already marked Compliant do not pick up the new version. Since they remain compliant, remediation does not trigger, and the version change is not reflected. I checked whether there is a way to evaluate version in the guest assignment, but I don’t see any supported field for this. How to force a version bump for existing compliant resources so they align with the updated package? My current code checks the compliant state: { "field": "Microsoft.GuestConfiguration/guestConfigurationAssignments/parameterHash", "equals": "xxxxxxxxxxxxxxxxxxxxxxxxx" }, { "field": "Microsoft.GuestConfiguration/guestConfigurationAssignments/complianceStatus", "equals": "Compliant" }

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:azureView on Stack Exchange

Unable to give consent/login with my Foundry Agent to my MCP server OAuth Identity Passthrough for a custom MCP server fails before Microsoft Entra authentication begins. The request is redirected to logic-norwayeast-001.consent.azure-apihub.net , which returns an ASP.NET runtime error. The request never reaches Microsoft Entra (verified by Entra Sign-in Logs), and the MCP server is never invoked. The same issue reproduces with: New Azure AI Foundry Project New App Registration New Client Secret New OAuth Credential Provider New Redirect URI New Container App Authentication Provider The MCP works perfectly when configured as Unauthenticated , proving the MCP server and Container App are functioning correctly. Entra Sign-in Logs showing no failed sign-in. I can reproduce it from: Azure AI Foundry Playground Microsoft Teams See screenshot: Also the URL https://logic-norwayeast-001.consent.azure-apihub.net/login?data=<redacted>

Repurpose (generate each channel independently)
Discord
LinkedIn
X
stackexchangestackoverflow:amazon-web-servicesView on Stack Exchange

I need to list the S3 partitions of a Hive-style table, in order to register the missing ones in the Glue Data Catalog. The keys look like this: s3://my-bucket/my-table/year=2026/month=07/day=08/part-00000.parquet With ListObjectsV2 I can either: List all keys — very inefficient for large amounts of files, since it returns max 1000 keys per call and I have to page through every object just to derive the partition prefixes. List CommonPrefixes with Delimiter="/" — this only returns one hierarchy level per call, and therefore gets even worse for deeply nested partitions: year=/month=/day= requires a recursive walk over every intermediate node. Is there another way to list partitions , instead of keys or a single hierarchy level?

Repurpose (generate each channel independently)
Discord
LinkedIn
X