Skip to content

emulators, dataconnect, local postgres, graphql issue after upgrade 14.25.1 -> 14.26.0 #9508

Closed

Description

@portah

[REQUIRED] Environment info

nodejs: 20.19.5
export FIREBASE_DATACONNECT_POSTGRESQL_STRING=postgres://localhost:5432/postgres?sslmode=disable
export DATA_CONNECT_EMULATOR_HOST='127.0.0.1:9399'

firebase-tools:
14.25.1 & 14.26.0

Platform:
MacOS

[REQUIRED] Test case

# UserProfile extends User with additional profile information and 2FA settings
type UserProfile @table(key: "uid") {
  # Links to Firebase Auth UID - this is the primary key
  uid: String! @default(expr: "auth.uid")
  email: String! @col(dataType: "varchar(255)")
  firstName: String @col(dataType: "varchar(50)")
  lastName: String @col(dataType: "varchar(50)")
  phoneNumber: String @col(dataType: "varchar(20)")
  photoURL: String @col(dataType: "varchar(500)")
  role: String @col(dataType: "varchar(50)")

  # 2FA related fields
  twoFactorEnabled: Boolean! @default(value: false)
  twoFactorSecret: String @col(dataType: "varchar(32)") # Base32 encoded secret for authenticator apps
  backupCodes: [String!] # Array of backup codes for 2FA recovery

  # Profile metadata
  createdAt: Timestamp! @default(expr: "request.time")
  updatedAt: Timestamp! @default(expr: "request.time")
  lastLoginAt: Timestamp

  # User preferences
  language: String @col(dataType: "varchar(10)") @default(value: "en")
  timezone: String @col(dataType: "varchar(50)")

  # Account status - 'pending' (not signed in yet), 'active', 'inactive', 'suspended'
  status: String! @col(dataType: "varchar(20)") @default(value: "pending")
  isDeleted: Boolean! @default(value: false)
}

# Get current user's profile based on their auth.uid
query GetUserProfile @auth(level: USER_EMAIL_VERIFIED) {
    userProfile(key: { uid_expr: "auth.uid" }) {
        uid
        email
        firstName
        lastName
        phoneNumber
        photoURL
        role
        twoFactorEnabled
        language
        timezone
        status
        createdAt
        updatedAt
        lastLoginAt
    }
}

import {
    getUserProfile,
} from '@dataconnect/generated';

    async getUserProfile(): Promise<GetUserProfileData> {
        if (this.userProfileData) {
            return this.userProfileData;
        }
        this.userProfileData = (await getUserProfile(this.dataConnect as any)).data;
        return this.userProfileData;
    }

on the emulators side when use firebase tools 14.25.1

I1122 11:33:21.301175   39652 engine.go:172] [/emulator/xxx-xxxon-development 6489] ExecuteGraphql : succeeded. 
I1122 11:33:22.347075   39652 prepare.go:158] [operation "GetUserProfile" attempt 1] preparePlan succeeded
I1122 11:33:22.347103   39652 prepare.go:145] [operation "GetUserProfile" attempt 1] DBStats beforePrepare: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}, afterPrepare: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}
I1122 11:33:22.363611   39652 executor.go:92] [operation "GetUserProfile" attempt 1] DBStats beforeRun: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}, afterRun: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}
I1122 11:33:22.363677   39652 engine.go:172] [/emulator/xxx-xxxon-development 6489] ExecuteQuery GetUserProfile: succeeded. Connector: xxx-xxxon

And when update to firebase tools 14.26.0

I1122 11:47:11.653282   48808 engine.go:179] [/emulator/xxx-xxxon-development 7898] ExecuteGraphql : succeeded. 
W1122 11:47:12.688665   48808 engine.go:177] [/emulator/xxx-xxxon-development 7898] ExecuteQuery GetUserProfile: failed with explicit status error: rpc error: code = Internal desc = internal error: unexpected internal error has occurred. Connector: xxx-xxxon
Auth: user of {"UID":"HAe54sikpSjT5bvmRyIAzWjPlGhM","Token":{"aud":"XXX-XXXon","auth_time":1763830031,"email":"[email protected]","email_verified":true,"exp":1763833631,"firebase":{"identities":{"email":["[email protected]"]},"sign_in_provider":"password"},"iat":1763830031,"iss":"https://securetoken.google.com/xxx-xxxon","name":"","picture":"","role":"admin","sub":"HAe54sikpSjT5bvmRyIAzWjPlGhM","user_id":"HAe54sikpSjT5bvmRyIAzWjPlGhM"}}
Status: rpc error: code = Internal desc = internal error: unexpected internal error has occurred
sources: xxx/mutations.gql [30226B] xxx/queries.gql [27779B] 

[REQUIRED] Steps to reproduce

see above

run generated function getUserProfile from a browser and emulators can't finish the graphQl execution

[REQUIRED] Expected behavior

do not crush

[REQUIRED] Actual behavior

crushing

Activity

  1. changed the title [-]emulators data-connect issue after upgrade 14.25.1 -> 14.26.0[/-] [+]emulators, dataconnect, local postgres, graphql issue after upgrade 14.25.1 -> 14.26.0[/+] on Nov 22, 2025
  2. added
    emulator: dataconnect
    on Nov 24, 2025
  3. fredzqm commented on Dec 2, 2025

    @fredzqm
    Contributor

    @portah

    Sorry to hear you are experiencing issues with the Data Connect emulator.

    I tried to reproduce the bug in my mac, but couldn't get GetUserProfile to fail. It could be something transient related to setup.

    While debugging this, I realized that we have been swallowing the underlying debug details in some cases. Let me fix that in future releases, hopefully the root cause will be apparent with extra information.

    Thanks for reporting the bug!

  4. self-assigned this
    on Dec 2, 2025
  5. fredzqm commented on Dec 5, 2025

    @fredzqm
    Contributor

    Let me know if the issue still persists~ If so, what logs are emitted in the new release~

    Would be happy to look into them more~ Meanwhile, close this issue.

    Glad that we found the "swallowed log" bug!

  6. portah commented on Jan 8, 2026

    @portah
    Author

    @fredzqm sorry did not get earlier to you. updated to the latest 15.2.0 and still can't execute graphql query, that were okey with 14.25.1

    [debug] [2026-01-08T03:19:05.027Z] I0107 22:19:05.027552    2963 executor.go:91] [operation "UpdateUserProfile"] DBStats beforeRun: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}, afterRun: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}
    I0107 22:19:05.027594    2963 engine.go:179] [/emulator/mlc-nutrition-development 1a39] ExecuteGraphql : succeeded. 
     {"metadata":{"emulator":{"name":"dataconnect"},"message":"I0107 22:19:05.027552    2963 executor.go:91] [operation \"UpdateUserProfile\"] DBStats beforeRun: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}, afterRun: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}\nI0107 22:19:05.027594    2963 engine.go:179] [/emulator/mlc-nutrition-development 1a39] ExecuteGraphql : succeeded. \n"}}
    [info] >  {"uid":"HAe54sikpSjT5bvmRyIAzWjPlGhM","email":"[email protected]","role":"mlc_admin","severity":"DEBUG","message":"User profile role updated in database"} {"user":{"uid":"HAe54sikpSjT5bvmRyIAzWjPlGhM","email":"[email protected]","role":"mlc_admin","severity":"DEBUG","message":"User profile role updated in database"},"metadata":{"emulator":{"name":"functions"},"function":{"name":"us-central1-onUserSignIn"},"extension":{},"message":"\u001b[90m> \u001b[39m {\"uid\":\"HAe54sikpSjT5bvmRyIAzWjPlGhM\",\"email\":\"[email protected]\",\"role\":\"mlc_admin\",\"severity\":\"DEBUG\",\"message\":\"User profile role updated in database\"}"}}
    [debug] [2026-01-08T03:19:05.030Z] I0107 22:19:05.030326    2963 executor.go:91] [operation "UpdateUserProfile"] DBStats beforeRun: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}, afterRun: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}
     {"metadata":{"emulator":{"name":"dataconnect"},"message":"I0107 22:19:05.030326    2963 executor.go:91] [operation \"UpdateUserProfile\"] DBStats beforeRun: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}, afterRun: sql.DBStats{MaxOpenConnections:1, OpenConnections:1, InUse:0, Idle:1, WaitCount:0, WaitDuration:0, MaxIdleClosed:0, MaxIdleTimeClosed:0, MaxLifetimeClosed:0}\n"}}
    [debug] [2026-01-08T03:19:05.030Z] I0107 22:19:05.030344    2963 engine.go:179] [/emulator/mlc-nutrition-development 1a39] ExecuteGraphql : succeeded. 
     {"metadata":{"emulator":{"name":"dataconnect"},"message":"I0107 22:19:05.030344    2963 engine.go:179] [/emulator/mlc-nutrition-development 1a39] ExecuteGraphql : succeeded. \n"}}
    [info] >  {"uid":"HAe54sikpSjT5bvmRyIAzWjPlGhM","email":"[email protected]","severity":"INFO","message":"User sign-in validated"} {"user":{"uid":"HAe54sikpSjT5bvmRyIAzWjPlGhM","email":"[email protected]","severity":"INFO","message":"User sign-in validated"},"metadata":{"emulator":{"name":"functions"},"function":{"name":"us-central1-onUserSignIn"},"extension":{},"message":"\u001b[90m> \u001b[39m {\"uid\":\"HAe54sikpSjT5bvmRyIAzWjPlGhM\",\"email\":\"[email protected]\",\"severity\":\"INFO\",\"message\":\"User sign-in validated\"}"}}
    [debug] [2026-01-08T03:19:05.032Z] Finishing up request with event=pause {"metadata":{"emulator":{"name":"functions"},"function":{"name":"us-central1-onUserSignIn"},"extension":{},"message":"Finishing up request with event=pause"}}
    [info] i  functions: Finished "us-central1-onUserSignIn" in 32.48325ms {"metadata":{"emulator":{"name":"functions"},"function":{"name":"us-central1-onUserSignIn"},"extension":{},"message":"Finished \"us-central1-onUserSignIn\" in 32.48325ms"}}
    [debug] [2026-01-08T03:19:05.032Z] [worker-us-central1-onUserSignIn-43945214-55f4-45a2-94d0-7e024934a76c]: IDLE {"metadata":{"emulator":{"name":"functions"},"function":{"name":"us-central1-onUserSignIn"},"extension":{},"message":"[worker-us-central1-onUserSignIn-43945214-55f4-45a2-94d0-7e024934a76c]: IDLE"}}
    [debug] [2026-01-08T03:19:05.032Z] Finishing up request with event=finish {"metadata":{"emulator":{"name":"functions"},"function":{"name":"us-central1-onUserSignIn"},"extension":{},"message":"Finishing up request with event=finish"}}
    [debug] [2026-01-08T03:19:05.032Z] Finishing up request with event=close {"metadata":{"emulator":{"name":"functions"},"function":{"name":"us-central1-onUserSignIn"},"extension":{},"message":"Finishing up request with event=close"}}
    [debug] [2026-01-08T03:19:05.032Z] [work-queue] {"queuedWork":[],"queueLength":0,"runningWork":[],"workRunningCount":0}
    [debug] [2026-01-08T03:19:06.067Z] W0107 22:19:06.066886    2963 engine.go:177] [/emulator/mlc-nutrition-development 1a39] ExecuteQuery GetUserProfile: failed with explicit status error: rpc error: code = Internal desc = internal error: unexpected internal error has occurred. Connector: mlc-nutrition
    Auth: user of {"UID":"HAe54sikpSjT5bvmRyIAzWjPlGhM","Token":{"aud":"mlc-nutrition","auth_time":1767842345,"email":"[email protected]","email_verified":true,"exp":1767845945,"firebase":{"identities":{"email":["[email protected]"]},"sign_in_provider":"password"},"iat":1767842345,"iss":"https://securetoken.google.com/mlc-nutrition","name":"","picture":"","role":"mlc_admin","sub":"HAe54sikpSjT5bvmRyIAzWjPlGhM","user_id":"HAe54sikpSjT5bvmRyIAzWjPlGhM"}}
    Status: rpc error: code = Internal desc = internal error: unexpected internal error has occurred
    Errors: [message:"not supported"  extensions:{code:INTERNAL  debug_details:"%!w(<nil>)"}]
    sources: mlc/mutations.gql [34607B] mlc/queries.gql [28391B] 
     {"metadata":{"emulator":{"name":"dataconnect"},"message":"W0107 22:19:06.066886    2963 engine.go:177] [/emulator/mlc-nutrition-development 1a39] ExecuteQuery GetUserProfile: failed with explicit status error: rpc error: code = Internal desc = internal error: unexpected internal error has occurred. Connector: mlc-nutrition\nAuth: user of {\"UID\":\"HAe54sikpSjT5bvmRyIAzWjPlGhM\",\"Token\":{\"aud\":\"mlc-nutrition\",\"auth_time\":1767842345,\"email\":\"[email protected]\",\"email_verified\":true,\"exp\":1767845945,\"firebase\":{\"identities\":{\"email\":[\"[email protected]\"]},\"sign_in_provider\":\"password\"},\"iat\":1767842345,\"iss\":\"https://securetoken.google.com/mlc-nutrition\",\"name\":\"\",\"picture\":\"\",\"role\":\"mlc_admin\",\"sub\":\"HAe54sikpSjT5bvmRyIAzWjPlGhM\",\"user_id\":\"HAe54sikpSjT5bvmRyIAzWjPlGhM\"}}\nStatus: rpc error: code = Internal desc = internal error: unexpected internal error has occurred\nErrors: [message:\"not supported\"  extensions:{code:INTERNAL  debug_details:\"%!w(<nil>)\"}]\nsources: mlc/mutations.gql [34607B] mlc/queries.gql [28391B] \n"}}
    [debug] [2026-01-08T03:21:43.229Z] Received signal SIGINT (Ctrl-C) 1
    
    
    

    In the browser also not much:

    chunk-5K356HEJ.js:51 
     POST http://localhost:9399/v1/projects/mlc-nutrition/locations/us-central1/services/mlc-nutrition-development/connectors/mlc-nutrition:executeQuery?key=... 500 (Internal Server Error)
    
    chunk-5K356HEJ.js:39 [2026-01-08T03:19:06.068Z]  @firebase/data-connect: DataConnect (11.10.0): Error while performing request: {"code":13,"message":"internal error: unexpected internal error has occurred","details":[{"@type":"type.googleapis.com/google.firebase.dataconnect.http.GraphqlError","message":"not supported","locations":[],"path":null,"extensions":{"file":"","code":"INTERNAL","debugDetails":"%!w(<nil>)","resource":"","warningLevel":"WARNING_LEVEL_UNKNOWN","workarounds":[]}}]}
    chunk-5K356HEJ.js:51 ERROR DataConnectError: internal error: unexpected internal error has occurred
    
  7. reopened this on Jan 20, 2026
  8. portah commented on Jan 21, 2026

    @portah
    Author

    Sorry for opening new issue.

    I'm here to help to debug what is different between 14.25.1 and other versions.

  9. fredzqm commented on Jan 22, 2026

    @fredzqm
    Contributor

    @portah

    Sorry about the delay~

    Based on bug you reported. I recently did some internal clean up and replaced "not supported" with more descriptive error messages.

    Can you help check what's the behavior in the latest version? Last week at 15.3.1

    Thanks a lot! Appreciate the eager to help!

  10. portah commented on Jan 23, 2026

    @portah
    Author

    Okey and now magic happened

    % firebase --version
    15.4.0

    Everything works just fine. Will check with 15.3.1 out of curiosity.

    Big magic: 15.3.1 also works fine
    Then I went back into commits of 1, 2, 3 weeks ago all are working with the latest 15.4.0

  11. fredzqm commented on Jan 23, 2026

    @fredzqm
    Contributor

    Sweet. Thanks for confirming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

emulator: dataconnecttype: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions