[Firebase Mobile] Error executing query UpdateDevice in RegisterDevice

Forge Component
(12)
Published on 17 Jul (5 days ago) by David Sousa
12 votes
Published on 17 Jul (5 days ago) by David Sousa

Hello,

In our resume process, it calls the RegistrerDevice function and produces an error in the service center platform. All the native functions are not affected and customers do not see this message.


Error in ServiceCenter:
Error executing query. Error in advanced query UpdateDevice in RegisterDevice in DeviceManagement in FirebaseMiddleware (UPDATE {Device}  SET {Device}.[UserId] = @UserId, {Device}.[RegistrationId] = @RegistrationId, {Device}.[UpdatedOn] = @UpdatedOn  WHERE {Device}.[HardwareId] = @DeviceHardwareId AND {Device}.[ApplicationId] = @Applicationid): ORA-02291: integrity constraint (OSADMIN_OSDEV1.OSFRK_OSUSR_VBW_DEVICE_OS84872) violated - parent key not found


Is it a known error?
What could be causing this error?
Is there a problem in the proper functioning of the plugin when not using the Devices table in FirebaseMiddlerware?


PD: Thanks for building this plugin.

PD2: Excuse my english.

We could need some more detail, but from the stack trace it appears that you are trying to execute the update with a nonexisting foreign key

Since the only 2 keys in that table are UserId and DevicePlatformId and this last one is a static entity (and therefore should exist without any issues) I'm assuming that the problem is that you are trying to register a device to a nonexisting User

Does this help?

Best regards,

PC

Mattias Contreras,

We identified that issue and realized it's happening on a Java stack, when the UserId passed to the SQL UpdateDevice in the action RegisterDevice is 0.

The latest version of the plugin (1.0.1) has a fix to that problem.

Best regards,

David