ERROR 151: Sync Failed
Error 151 is a generic error code for data being queried for and not found.
There are several reasons for this situation:
Data Missing from the Local Database
Sometimes, the data is not in the local database on the device because it was not synced to Pulsar. Often, this occurs for one of two reasons:
Sync filter configuration - A sync filter may have been set up, and the requested data is not syncing to Pulsar. Check the sync filters in your Pulsar settings and ensure that the desired objects and records are marked for syncing to Pulsar. For more information about data sync filters, refer to Data Sync Settings | Sync Data Filter using a "Where" Clause.
User permissions - The user may not have the permission to view or download the data. Check the user permissions and profile permissions in Salesforce.
Example 1: The record is not in the local database
In this example, Pulsar is attempting to read a table from the Account object and the field AccountId, and it fails. The table isn’t synced, so Pulsar cannot read the field within it.
[23-07-05 19:00:23][ERROR][0x173887000] - dbReadTableId (Account, 0010O00001kyhetQAA) failed (151)
[23-07-05 19:00:23][WARN ][0x173887000] - getNextValueForRelationshipChain: relationship object unable to be read `AccountId` (0010O00001kyhetQAA) 151
[23-07-05 19:00:23][ERROR][0x16e287000] - dbReadTableId (Account, 0010O00001kyhetQAA) failed (151)
[23-07-05 19:00:23][WARN ][0x16e287000] - getNextValueForRelationshipChain: relationship object unable to be read `AccountId` (0010O00001kyhetQAA) 151
Example 2: The record does not exist
This example is similar to Example 1. In this case, a custom page (JSAPI) is attempting to access a record via SQL Query. Unfortunately, the record does not exist, and it fails.
[23-07-05 19:02:08][ERROR][0x16beaf000] - JSAPI: object read failed
[23-07-05 19:02:08][ERROR][0x16b9c3000] - dbReadTableId (Account, 0010O00001kyhetQAA) failed (151)
Example 3: The metadata is missing
If the metadata did not download to the local database, then you may get Error 151.
In this example, Pulsar is attempting to retrieve some metadata for the Approvals Quick Action, and it fails because the data does not exist on the server.
[23-07-06 05:37:24][ERROR][0x16dd5f000] - Failed to retrieve json metadata for quickaction (Approvals, 151) -- skipping
In another example of this situation, the custom page (JSAPI) is trying to retrieve compact layout information, and it fails because the data does not exist on the server.
Example 4: Query issues
Sometimes a query attempts to fetch items like icons and images, and they do not exist in the local database.
In other cases, a query with incorrect parameters will cause Error 151. In this example, the query has an “undefined” parameter.
Initial Sync
During an initial sync, Pulsar attempts to find out the previous license status, but since it is the first sync attempt, there is no previous status to find.
The next sync (catch-up sync) will fetch the previous license status, and this error will go away.