firebase-tools
firebase-tools copied to clipboard
DataConnect connection fails with 'No schema found for service' error when retrieving data
[REQUIRED] Environment info
**firebase-tools:**13.22.0
**Platform:**macOS
[REQUIRED] Steps to reproduce
- Define the schema and queries for DataConnect.
- Generate the SDK.
- 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":[]}
This issue does not seem to follow the issue template. Make sure you provide all the required information.
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?
How can i be able to solve this command 'firebase.dataConnect.executeOperationAtCursor' not found.
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 thedataconnectsection of yourfirebase.json?