Skip to content

Commit bd264a7

Browse files
committed
Merge remote-tracking branch 'origin' into flutterflow-guide-v3
2 parents cc53e36 + ffab1e6 commit bd264a7

File tree

11 files changed

+721
-82
lines changed

11 files changed

+721
-82
lines changed

client-sdk-references/javascript-web/usage-examples.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ description: "Code snippets and guidelines for common scenarios"
66
## Multiple Tab Support
77

88
<Warning>
9-
Multiple tab support is not currently available on Android or Safari.
9+
* Multiple tab support is not currently available on Android.
10+
* For Safari, use the [`OPFSCoopSyncVFS`](/client-sdk-references/javascript-web#sqlite-virtual-file-systems) virtual file system to ensure stable multi-tab functionality.
1011
</Warning>
1112

1213
Using PowerSync between multiple tabs is supported on some web browsers. Multiple tab support relies on shared web workers for database and sync streaming operations. When enabled, shared web workers named `shared-DB-worker-[dbFileName]` and `shared-sync-[dbFileName]` will be created.

client-sdk-references/swift.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebarTitle: "Overview"
66
<CardGroup cols={3}>
77
<Card title="Source Code" icon="github" href="https://github.com/powersync-ja/powersync-swift/">
88
Refer to the powersync-swift repo on GitHub.
9-
</Card>
9+
</Card>
1010
<Card title="API Reference (Coming soon)" icon="book" href="">
1111
A full API Reference for this SDK is not yet available. This is planned for the V1 release.
1212
</Card>
@@ -326,7 +326,7 @@ func updateTodo(_ todo: Todo) async throws {
326326

327327
func deleteTodo(id: String) async throws {
328328
try await db.writeTransaction(callback: { transaction in
329-
_ = try await transaction.execute(
329+
_ = transaction.execute(
330330
sql: "DELETE FROM \(TODOS_TABLE) WHERE id = ?",
331331
parameters: [id]
332332
)
83.9 KB
Loading
92.5 KB
Loading

integration-guides/supabase-+-powersync/handling-attachments.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Examples of syncing attachments between a client app and Supabase
77

88
Our React Native [To-Do List demo app](https://github.com/powersync-ja/powersync-js/tree/main/demos/react-native-supabase-todolist) showcases how to sync attachments (such as photos) using the [@powersync/attachments](https://www.npmjs.com/package/@powersync/attachments) library, the PowerSync Service, and Supabase.
99

10-
In this example, we are syncing photos, however other media types, such as PDFs, are also supported.
10+
In this example, we are syncing photos, however other media types, such as [PDFs](/tutorials/client/attachments-and-files/pdf-attachment), are also supported.
1111

1212
The library and this example implementation can be used as a reference for implementing similar functionality for a Postgres backend without Supabase.
1313

migration-guides/mongodb-atlas.mdx

Lines changed: 446 additions & 71 deletions
Large diffs are not rendered by default.

mint.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,13 @@
418418
"group": "Resources",
419419
"pages": [
420420
"resources/demo-apps-example-projects",
421-
"resources/local-first-software",
421+
{
422+
"group": "Troubleshooting",
423+
"pages": [
424+
"resources/troubleshooting",
425+
"resources/troubleshooting/error-codes"
426+
]
427+
},
422428
{
423429
"group": "Usage & Billing",
424430
"pages": [
@@ -427,11 +433,11 @@
427433
"resources/usage-and-billing-faq"
428434
]
429435
},
430-
"resources/troubleshooting",
431436
"resources/performance-and-limits",
432437
"resources/feature-status",
433438
"resources/supported-hardware",
434439
"resources/faq",
440+
"resources/local-first-software",
435441
"resources/release-notes",
436442
"resources/roadmap",
437443
"resources/blog",

resources/troubleshooting.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Troubleshooting"
33
description: "Summary of common issues, troubleshooting tools and pointers."
4+
sidebarTitle: "Overview"
45
---
56

67
## Common issues
Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
---
2+
title: "Error Codes Reference"
3+
description: "Complete list of PowerSync error codes with explanations and troubleshooting guidance."
4+
sidebarTitle: "Error Codes"
5+
---
6+
7+
This reference documents PowerSync error codes organized by component, with troubleshooting suggestions for developers. Use the search bar to look up specific error codes (e.g., `PSYNC_R0001`).
8+
9+
# PSYNC_Rxxxx: Sync rules issues
10+
11+
- **PSYNC_R0001**:
12+
Catch-all sync rules parsing error, if no more specific error is available
13+
14+
# PSYNC_Sxxxx: Service issues
15+
16+
- **PSYNC_S0001**:
17+
Internal assertion.
18+
19+
If you see this error, it might indicate a bug in the service code.
20+
21+
- **PSYNC_S0102**:
22+
TEARDOWN was not acknowledged.
23+
24+
This happens when the TEARDOWN argument was not supplied when running
25+
the service teardown command. The TEARDOWN argument is required since
26+
this is a destructive command.
27+
28+
Run the command with `teardown TEARDOWN` to confirm.
29+
30+
## PSYNC_S1xxx: Replication issues
31+
32+
- **PSYNC_S1002**:
33+
Row too large.
34+
35+
There is a 15MB size limit on every replicated row - rows larger than
36+
this cannot be replicated.
37+
38+
- **PSYNC_S1003**:
39+
Sync rules have been locked by another process for replication.
40+
41+
This error is normal in some circumstances:
42+
1. In some cases, if a process was forcefully terminated, this error may occur for up to a minute.
43+
2. During rolling deploys, this error may occur until the old process stops replication.
44+
45+
If the error persists for longer, this may indicate that multiple replication processes are running.
46+
Make sure there is only one replication process apart from rolling deploys.
47+
48+
- **PSYNC_S1004**:
49+
JSON nested object depth exceeds the limit of 20.
50+
51+
This may occur if there is very deep nesting in JSON or embedded documents.
52+
53+
## PSYNC_S11xx: Postgres replication issues
54+
55+
- **PSYNC_S1101**:
56+
Replication assertion error.
57+
58+
If you see this error, it might indicate a bug in the service code.
59+
60+
- **PSYNC_S1103**:
61+
Aborted initial replication.
62+
63+
This is not an actual error - it is expected when the replication process
64+
is stopped, or if replication is stopped for any other reason.
65+
66+
- **PSYNC_S1104**:
67+
Explicit cacert is required for `sslmode: verify-ca`.
68+
69+
Use either verify-full, or specify a certificate with verify-ca.
70+
71+
- **PSYNC_S1105**:
72+
`database` is required in connection config.
73+
74+
Specify the database explicitly, or in the `uri` field.
75+
76+
- **PSYNC_S1106**:
77+
`hostname` is required in connection config.
78+
79+
Specify the hostname explicitly, or in the `uri` field.
80+
81+
- **PSYNC_S1107**:
82+
`username` is required in connection config.
83+
84+
Specify the username explicitly, or in the `uri` field.
85+
86+
- **PSYNC_S1108**:
87+
`password` is required in connection config.
88+
89+
Specify the password explicitly, or in the `uri` field.
90+
91+
- **PSYNC_S1109**:
92+
Invalid database URI.
93+
94+
Check the URI scheme and format.
95+
96+
- **PSYNC_S1110**:
97+
Invalid port number.
98+
99+
Only ports in the range 1024 - 65535 are supported.
100+
101+
- **PSYNC_S1141**:
102+
Publication does not exist.
103+
104+
Run: `CREATE PUBLICATION powersync FOR ALL TABLES` on the source database.
105+
106+
- **PSYNC_S1142**:
107+
Publication does not publish all changes.
108+
109+
Create a publication using `WITH (publish = "insert, update, delete, truncate")` (the default).
110+
111+
- **PSYNC_S1143**:
112+
Publication uses publish_via_partition_root.
113+
114+
## PSYNC_S13xx: MongoDB replication issues
115+
116+
- **PSYNC_S1301**:
117+
Generic MongoServerError.
118+
119+
- **PSYNC_S1302**:
120+
Generic MongoNetworkError.
121+
122+
- **PSYNC_S1303**:
123+
MongoDB internal TLS error.
124+
125+
If connection to a shared cluster on MongoDB Atlas, this could be an IP Acccess List issue.
126+
Check that the service IP is allowed to connect to the cluster.
127+
128+
- **PSYNC_S1304**:
129+
MongoDB connection DNS error.
130+
131+
Check that the hostname is correct.
132+
133+
- **PSYNC_S1305**:
134+
MongoDB connection timeout.
135+
136+
Check that the hostname is correct, and that the service IP is allowed to connect to the cluster.
137+
138+
- **PSYNC_S1306**:
139+
MongoDB authentication error.
140+
141+
Check the username and password.
142+
143+
- **PSYNC_S1307**:
144+
MongoDB authorization error.
145+
146+
Check that the user has the required priviledges.
147+
148+
- **PSYNC_S1341**:
149+
Sharded MongoDB Clusters are not supported yet.
150+
151+
- **PSYNC_S1342**:
152+
Standalone MongoDB instances are not supported - use a replicaset.
153+
154+
- **PSYNC_S1343**:
155+
PostImages not enabled on a source collection.
156+
157+
Use `post_images: auto_configure` to configure post images automatically, or enable manually:
158+
159+
```
160+
db.runCommand({
161+
collMod: 'collection-name',
162+
changeStreamPreAndPostImages: { enabled: true }
163+
});
164+
```
165+
166+
## PSYNC_S14xx: MongoDB storage replication issues
167+
168+
- **PSYNC_S1402**:
169+
Max transaction tries exceeded.
170+
171+
## PSYNC_S2xxx: Service API
172+
173+
- **PSYNC_S2001**:
174+
Generic internal server error (HTTP 500).
175+
176+
See the error details for more info.
177+
178+
- **PSYNC_S2002**:
179+
Route not found (HTTP 404).
180+
181+
- **PSYNC_S2003**:
182+
503 service unavailable due to restart.
183+
184+
Wait a while then retry the request.
185+
186+
## PSYNC_S21xx: Auth errors originating on the client.
187+
188+
This does not include auth configuration errors on the service.
189+
190+
- **PSYNC_S2101**:
191+
Generic authentication error.
192+
193+
## PSYNC_S22xx: Auth integration errors
194+
195+
- **PSYNC_S2202**:
196+
IPv6 support is not enabled for the JWKS URI.
197+
198+
Use an endpoint that supports IPv4.
199+
200+
- **PSYNC_S2203**:
201+
IPs in this range are not supported.
202+
203+
Make sure to use a publically-accessible JWKS URI.
204+
205+
## PSYNC_S23xx: Sync API errors
206+
207+
- **PSYNC_S2302**:
208+
No sync rules available.
209+
210+
This error may happen if:
211+
1. Sync rules have not been deployed.
212+
2. Sync rules have been deployed, but is still busy processing.
213+
214+
View the replicator logs to see if the sync rules are being processed.
215+
216+
- **PSYNC_S2304**:
217+
Maximum active concurrent connections limit has been reached.
218+
219+
## PSYNC_S23xx: Sync API errors - MongoDB Storage
220+
221+
- **PSYNC_S2401**:
222+
Could not get clusterTime.
223+
224+
## PSYNC_S31xx: Auth configuration issues
225+
226+
- **PSYNC_S3102**:
227+
Invalid jwks_uri.
228+
229+
- **PSYNC_S3103**:
230+
Only http(s) is supported for jwks_uri.
231+
232+
## PSYNC_S32xx: Replication configuration issue.
233+
234+
- **PSYNC_S3201**:
235+
Failed to validate module configuration.
236+
237+
## PSYNC_S4000: Management / Dev APIs
238+
239+
- **PSYNC_S4001**:
240+
Internal assertion error.
241+
242+
This error may indicate a bug in the service code.
243+
244+
- **PSYNC_S4104**:
245+
No active sync rules.
246+
247+
- **PSYNC_S4105**:
248+
Sync rules API disabled.
249+
250+
When a sync rules file is configured, the dynamic sync rules API is disabled.
251+

self-hosting/installation/powersync-service-setup.mdx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,6 @@ client_auth:
173173

174174
```
175175

176-
<Info>
177-
**Important:** When using Postgres for sync bucket storage, a separate server is currently required for replication connections (if using Postgres for replication) and storage. Using the same server might cause unexpected results.
178-
</Info>
179-
180176
Specify the connection to Postgres in the `replication` section. Retrieving your database connection string / individual parameters differs by database hosting provider. See [Database Connection](/self-hosting/appendix/database-connection) for further details.
181177

182178
<Info>
@@ -189,6 +185,15 @@ Specify the connection to Postgres in the `replication` section. Retrieving your
189185

190186
Specify the connection to your sync bucket storage provider (Postgres or MongoDB) in the `storage` section.
191187

188+
### Postgres Storage
189+
190+
Separate Postgres servers are required for replication connections and sync bucket storage **if using PostgreSQL versions below 14**.
191+
192+
| PostgreSQL Version | Server configuration |
193+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
194+
| Below 14 | Separate servers are required for the source and sync bucket storage. Replication will be blocked if the same server is detected. |
195+
| 14 and above | The source database and sync bucket storage database can be on the same server. Using the same database (with separate schemas) is supported but may lead to higher CPU usage. Using separate servers remains an option. |
196+
192197
### Environment Variables
193198

194199
The config file uses custom tags for environment variable substitution.

snippets/create-cloud-instance.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
2. Give your instance a name, such as "Testing".
88
3. Under the "**General**" tab, you can change the default cloud region from US to EU, JP (Japan), AU (Australia) or BR (Brazil) if desired.
9-
* Note: More cloud regions are available, [contact us](/resources/contact-us) if you need a different region.
9+
* Note: Additional cloud regions will be considered on request, especially for customers on our Enterprise plan. Please [contact us](/resources/contact-us) if you need a different region.
1010
4. Under the **"DB Connections"** tab, click on the **+** icon and select your database technology.

0 commit comments

Comments
 (0)