MUX - API-1011 - The given offset is invalid - Notifications
search cancel

MUX - API-1011 - The given offset is invalid - Notifications

book

Article ID: 277641

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Notifications are failing for specific users in environment. When clicking the Notification icon in the MUX an error is received 'API-1011: The given offset '15' is invalid. Must be a whole positive number and less than total number of records'

Expected Results: Notification icon should display notifications

Actual Results: Clicking the notification link displays error, and no results displayed. There doesn't seem to be a way to clear any existing notifications that might be stuck.

Environment

Clarity 16.2.0, 16.2.1

Cause

This is caused by DE79035

Resolution

This is fixed in Clarity 16.2.1 patch #1 and 16.2.2.

Additional Information

Possible Workaround:

  1. Run the following query to identify the problematic records. This is for Oracle DB. Modify appropriately for MSSQL and Postgres.
    WITH notif AS(
        SELECT cn.id,
            REPLACE(
                substr(
                    cn.LOCALIZED_MESSAGE,
                    instr(cn.LOCALIZED_MESSAGE, 'summary":') + 9,
                    9
                ),
                '"',
                ''
            ) file_id,
            cu.user_name
        FROM CLB_NOTIFICATIONS cn,
            cmn_sec_users cu
        WHERE cn.receiver_id = cu.id
            AND cn.EVENT_TYPE = 'NOTIFICATION_CSVIMPORT_TYPE'
    )
    SELECT *
    FROM notif
    WHERE NOT EXISTS (
            SELECT 1
            FROM clb_dms_files files
            WHERE files.id = notif.file_id::int
        )

  2. Delete the problematic record using REST API:
    DELETE https://<servername>/ppm/rest/v1/private/purgePushNotifications
    BODY :- {"notificationsId":["ID from Query"]}

  3. If the API call does not work with an admin's account, try using the affected user's account to call the API.