Skip to content
Railway MCP / ChatGPT Integration Returns “Viewer Role” Errors Despite Admin Access
holynationsempire
OP

a month ago

Hello Railway team and community,

I'm building HNE Creative Brain, a FastAPI application hosted on Railway, and I'm experiencing an inconsistent permission issue with the Railway integration connected to ChatGPT.

My setup

  • Railway project: "HNE Creative Brain Staging"
    • Workspace: "Emmanuel Ojo's Projects"
    • My Railway workspace role: Admin
    • ChatGPT's authorization in Railway: "workspace:member"
    • Authorized workspace scope: All workspaces
    • GitHub repository: "holynationsempire/hne-creative-brain"

The problem

The integration repeatedly returned:

"You don't have the required role (viewer) on this resource."

Initially, this prevented the integration from inspecting services and environment details, even though the Railway authorization page showed "workspace:member" and all-workspace access.

Troubleshooting already completed

  1. Confirmed that my Railway account is an Admin.
  2. Verified ChatGPT's authorization and all-workspace scope in Railway account settings.
  3. Revoked the existing ChatGPT authorization and reconnected it.
  4. Narrowed the authorization scope to my Railway projects.

Current status

After adjusting the scope, the integration can now:

  • Identify my Railway account and workspace.
    • List the project, environment, and services.
    • Read service configuration, deployment status, and persistent-volume mount information.

However, attempts to retrieve deployment logs still return the same "viewer" role error.

Both services are live, and both persistent volumes remain attached. I have not deleted either database or volume.

What I need help with

  1. Is this a known issue with Railway's OAuth/MCP integration or its permission checks?
  2. Why can the integration read project and service configuration but fail when requesting deployment logs?
  3. Is there a supported way to refresh or repair the integration's effective permissions without disrupting running services?
  4. Are there additional authorization scopes or account settings required for log access?

I'd appreciate guidance from a Railway engineer or community member who understands the Railway MCP integration and OAuth permission model.

Thank you!

Solved

3 Replies

Railway
BOT

a month ago

We can confirm your account is an Admin on that workspace, so your own role isn't what's blocking log access.

Deployment and build logs have a stricter permission requirement than reading project, service, and deployment details: logs need member-level access, while the other reads only need viewer access. That's why an integration can list services and config and still be refused on logs. The error comes from the integration's access check on the specific resource it's requesting, so the usual cause is that the authorization doesn't cover the project those logs belong to, for example when the grant was narrowed to a different set of projects than the one being queried.

There's no extra scope beyond workspace:member for logs. To refresh the integration's permissions, revoke ChatGPT on the Authorized Applications page and authorize it again with workspace:member covering the workspace that holds your project. Revoking only removes the app's tokens and doesn't affect your running services, deployments, or volumes.


Status changed to Awaiting User Response Railway • about 1 month ago


Railway

We can confirm your account is an Admin on that workspace, so your own role isn't what's blocking log access. Deployment and build logs have a stricter permission requirement than reading project, service, and deployment details: logs need member-level access, while the other reads only need viewer access. That's why an integration can list services and config and still be refused on logs. The error comes from the integration's access check on the specific resource it's requesting, so the usual cause is that the authorization doesn't cover the project those logs belong to, for example when the grant was narrowed to a different set of projects than the one being queried. There's no extra scope beyond `workspace:member` for logs. To refresh the integration's permissions, revoke ChatGPT on the [Authorized Applications](https://railway.com/account/apps) page and authorize it again with `workspace:member` covering the workspace that holds your project. Revoking only removes the app's tokens and doesn't affect your running services, deployments, or volumes.

holynationsempire
OP

a month ago

Subject: Intermittent Railway MCP Permission Errors and Production Database Write Failure

Hello Railway team,

I'm seeking assistance with two issues affecting my project, HNE Creative Brain, hosted on Railway.

Issue 1: Intermittent integration permission errors

My Railway workspace account has Admin access. The ChatGPT integration's authorization page showed "workspace:member" permissions and access to all workspaces.

Initially, the integration returned:

"You don't have the required role (viewer) on this resource."

After revoking and reauthorizing the integration, and adjusting the project access scope, I was able to list the project, inspect both services, and retrieve deployment logs. However, subsequent requests have again returned the same permission error.

This inconsistency is making it difficult to diagnose and maintain the application reliably.

Could you please help determine why the integration's effective permissions appear inconsistent, and whether there is a known issue with Railway's MCP/OAuth authorization?

Issue 2: Production SQLite database is read-only

The Production service logs recorded the following error during user registration:

"sqlite3.OperationalError: attempt to write a readonly database"

The traceback points to the user-registration code attempting to insert a new record into the SQLite "users" table.

Production uses a persistent volume named "hne-production-db-migration", mounted at "/migration". The application is configured to use a database on that mount.

Could you advise how to determine whether this is caused by file/directory ownership or permissions, SQLite journal-file permissions, or a Railway volume/runtime issue?

I want to resolve this without risking existing user data or disrupting the running application.

Project details

  • Project: "HNE Creative Brain Staging"
    • Workspace: "Emmanuel Ojo's Projects"
    • Production service: "hne-creative-brain"
    • AI Test service: "hne-db-migration-helper"
    • Repository: "holynationsempire/hne-creative-brain"

Both services and their persistent volumes were previously confirmed live. I have not deleted either database or volume.

I'd appreciate guidance from the Railway team on the intermittent permission errors and the safest way to diagnose the database write failure.

Thank you.


Status changed to Awaiting Railway Response Railway • about 1 month ago


Railway
BOT

a month ago

The hne-production-db-migration volume is attached to hne-creative-brain at /migration, its state is ready, and it is using about 17 MB of its 1 GB, so the volume is not full and is mounted normally. The read-only SQLite error comes from inside your application, not from the volume. Common causes are file or directory ownership and permissions, a database path that points somewhere other than the volume, or a missing journal file. Checking those is application debugging, which our community helps with on this board.

On the integration errors: reading logs needs member-level access to the specific project, while reading services and config only needs viewer access. That's why the integration can do some requests and get refused on others. If the grant is changed or narrowed to a set of projects that doesn't include "HNE Creative Brain Staging", log requests for that project will be refused again. You can revoke and re-authorize ChatGPT on the Authorized Applications page with workspace:member covering that workspace. Revoking only removes the app's tokens and doesn't affect your running services or volumes.


Status changed to Awaiting User Response Railway • about 1 month ago


Status changed to Solved holynationsempire • about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...