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

DataConnect connection fails with 'No schema found for service' error when retrieving data #7828

Open
1amageek opened this issue Oct 13, 2024 · 3 comments
Assignees
Labels
emulator: dataconnect Issues related to the dataconnect emulator type: bug

Comments

@1amageek
Copy link

[REQUIRED] Environment info

**firebase-tools:**13.22.0

**Platform:**macOS

[REQUIRED] Steps to reproduce

  1. Define the schema and queries for DataConnect.
  2. Generate the SDK.
  3. Run the application in Next.js.

┌─────────────────────────────────────────────────────────────┐
│ ✔  All emulators ready! It is now safe to connect your app. │
│ i  View Emulator UI at http://127.0.0.1:4040/               │
└─────────────────────────────────────────────────────────────┘

┌────────────────┬────────────────┬──────────────────────────────────┐
│ Emulator       │ Host:Port      │ View in Emulator UI              │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Authentication │ 127.0.0.1:9099 │ http://127.0.0.1:4040/auth       │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Functions      │ 127.0.0.1:5001 │ http://127.0.0.1:4040/functions  │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Firestore      │ 127.0.0.1:8080 │ http://127.0.0.1:4040/firestore  │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Hosting        │ 127.0.0.1:5002 │ n/a                              │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Storage        │ 127.0.0.1:9199 │ http://127.0.0.1:4040/storage    │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Data Connect   │ 127.0.0.1:9399 │ n/a                              │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Extensions     │ 127.0.0.1:5001 │ http://127.0.0.1:4040/extensions │
└────────────────┴────────────────┴──────────────────────────────────┘
  Emulator Hub running at 127.0.0.1:4400
  Other reserved ports: 4500, 9150
┌─────────────────────────┬───────────────┬─────────────────────┐
│ Extension Instance Name │ Extension Ref │ View in Emulator UI │
└─────────────────────────┴───────────────┴─────────────────────┘
  const dataConnect = getDataConnect(app, connectorConfig);
  connectDataConnectEmulator(dataConnect, "localhost", 9399, false);
  useEffect(() => {
    const uid = user?.uid
    if (!uid) return;
    getAccount({ id: uid })
      .then(async (data) => {
    
      })
  }, [user])
specVersion: "v1beta"
serviceId: "serviceID"
location: "asia-northeast1"
schema:
source: "./schema"
datasource:
  postgresql:
    database: "postgres"
    cloudSql:
      instanceId: "kura-fdc"
    # schemaValidation: "COMPATIBLE"
connectorDirs: ["./connector"]

[REQUIRED] Expected behavior

Data should be retrieved successfully.

[REQUIRED] Actual behavior

{"code":5,"message":"no schema found for service \"ServiceID\". No service has a schema.","details":[]}
@google-oss-bot
Copy link
Contributor

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@aalej aalej added the emulator: dataconnect Issues related to the dataconnect emulator label Oct 14, 2024
@joehan
Copy link
Contributor

joehan commented Oct 15, 2024

Hey @1amageek, sorry to hear you ran into this issue. To help us debug, could you share the contents of dataconnect-debug.log, firebase-debug.log, and the contents of the dataconnect section of your firebase.json?

@joehan joehan self-assigned this Oct 15, 2024
@Mbillohbarry
Copy link

How can i be able to solve this command 'firebase.dataConnect.executeOperationAtCursor' not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emulator: dataconnect Issues related to the dataconnect emulator type: bug
Projects
None yet
Development

No branches or pull requests

5 participants