Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Route Inside Dockerized App Repeating Results #65710

Open
sr5434 opened this issue May 13, 2024 · 1 comment
Open

API Route Inside Dockerized App Repeating Results #65710

sr5434 opened this issue May 13, 2024 · 1 comment
Labels
bug Issue was opened via the bug report template.

Comments

@sr5434
Copy link

sr5434 commented May 13, 2024

Link to the code that reproduces this issue

https://github.com/sr5434/spelling-bee

To Reproduce

  1. Create a GCP service account for the cloud TTS service.
  2. Create a .env in this format: ```
    GOOGLE_APPLICATION_CREDENTIALS="/app/service-account-filename.json"
    GOOGLE_CLOUD_PROJECT="project name"
3. Build the container and run it.
4. Play the audio and submit a random piece of text.
5. Play the audio again

### Current vs. Expected behavior

I am trying to have speech for different words play. The API route should be returning a random word with its audio(and this occurs when I am testing in development). However, when I containerize my app, the API route keeps returning the same result.

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #20~22.04.1-Ubuntu SMP Wed Apr  3 03:28:18 UTC 2024
  Available memory (MB): 7930
  Available CPU cores: 2
Binaries:
  Node: 20.12.1
  npm: 10.5.0
  Yarn: 1.22.19
  pnpm: 8.15.6
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

next start (local)

Additional context

The code works as expected when running npm run dev but breaks after Dockerizing.

@sr5434 sr5434 added the bug Issue was opened via the bug report template. label May 13, 2024
@sr5434
Copy link
Author

sr5434 commented May 14, 2024

It turns out, the app doesn't even need to be dockerized. When you run npm run build && npm run start the same issue occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

1 participant