[IdP] GenerateDeepLink gives runtime error

Forge Component
(43)
Published on 4 May (4 weeks ago) by Henrique Batista
43 votes
Published on 4 May (4 weeks ago) by Henrique Batista

I am using IdP version 4.2.3 and am getting a runtime error for GenerateDeepLink method.

It says GetAppIdForIOS has got syntax error. and here is a snippet of the query I can see -


SELECT SELECT iosCD.ApplicationId
from {Application} app
inner join {App_Mobile_Config} on app.[Key] = {App_Mobile_Config}.[Application_Key]
inner join OSSY@S_iOS_Config_Details iosCD on {App_Mobile_Config}.[Id] = iosCD.Id
where exists (select 1
              from {Application}
              inner join {App_Definition_Module} on {App_Definition_Module}.[Application_Id] = {Application}.[Id]
              inner join {Module} on {Module}.[Id] = {App_Definition_Module}.[Module_Id]
              inner join {Espace} on {Module}.[Espace_Id] = {Espace}.[Id]
              where {Espace}.[Name] = @Module
              and {Application}.[Id] = app.Id)


On a primary analysis I can pick up the redundant SELECT keyword at the start of the query but then after I am not sure what is the OSSY in front of the @S_IOS_Config_Details parameter meant to be for.


After removing the obvious extra SELECT keyword in the front of that query, I performed a test run and now I am getting this error logged on my platform monitoring for IdP component - 

Error executing query. Error in advanced query GetAppIdForIOS in GenerateDeepLink in IdP (SELECT iosCD.ApplicationId  from {Application} app  inner join {App_Mobile_Config} on app.[Key] = {App_Mobile_Config}.[Application_Key]  inner join OSSY@S_iOS_Config_Details iosCD on {App_Mobile_Config}.[Id] = iosCD.Id  where exists (select 1                from {Application}                inner join {App_Definition_Module} on {App_Definition_Module}.[Application_Id] = {Application}.[Id]                inner join {Module} on {Module}.[Id] = {App_Definition_Module}.[Module_Id]                inner join {Espace} on {Module}.[Espace_Id] = {Espace}.[Id]                where {Espace}.[Name] = @Module                 and {Application}.[Id] = app.Id)): Invalid column name 'ApplicationId'.


Is there any solution to this? I am not sure what ApplicationId I should be expecting here.

Solution

Dhruvin Gajjar wrote:

I am using IdP version 4.2.3 and am getting a runtime error for GenerateDeepLink method.

It says GetAppIdForIOS has got syntax error. and here is a snippet of the query I can see -


SELECT SELECT iosCD.ApplicationId
from {Application} app
inner join {App_Mobile_Config} on app.[Key] = {App_Mobile_Config}.[Application_Key]
inner join OSSY@S_iOS_Config_Details iosCD on {App_Mobile_Config}.[Id] = iosCD.Id
where exists (select 1
              from {Application}
              inner join {App_Definition_Module} on {App_Definition_Module}.[Application_Id] = {Application}.[Id]
              inner join {Module} on {Module}.[Id] = {App_Definition_Module}.[Module_Id]
              inner join {Espace} on {Module}.[Espace_Id] = {Espace}.[Id]
              where {Espace}.[Name] = @Module
              and {Application}.[Id] = app.Id)


On a primary analysis I can pick up the redundant SELECT keyword at the start of the query but then after I am not sure what is the OSSY in front of the @S_IOS_Config_Details parameter meant to be for.


After removing the obvious extra SELECT keyword in the front of that query, I performed a test run and now I am getting this error logged on my platform monitoring for IdP component - 

Error executing query. Error in advanced query GetAppIdForIOS in GenerateDeepLink in IdP (SELECT iosCD.ApplicationId  from {Application} app  inner join {App_Mobile_Config} on app.[Key] = {App_Mobile_Config}.[Application_Key]  inner join OSSY@S_iOS_Config_Details iosCD on {App_Mobile_Config}.[Id] = iosCD.Id  where exists (select 1                from {Application}                inner join {App_Definition_Module} on {App_Definition_Module}.[Application_Id] = {Application}.[Id]                inner join {Module} on {Module}.[Id] = {App_Definition_Module}.[Module_Id]                inner join {Espace} on {Module}.[Espace_Id] = {Espace}.[Id]                where {Espace}.[Name] = @Module                 and {Application}.[Id] = app.Id)): Invalid column name 'ApplicationId'.


Is there any solution to this? I am not sure what ApplicationId I should be expecting here.


After debugging this problem over last few hours, we have managed to solve this issue ourselves. It turns out to be an issue with the current version of IdP 4.2.3. The query I pasted above in my question is invalid. It has got two issues,

  • There is an extra SELECT keyword at the front of the query which needs to be removed.
  • The S_iOS_Config_Details table does not have a column ApplicationId column in it in the System table namespace. This needs to be changed to ApplicationIdentifier column


Here is a version that is fixed to work in OutSystems Platform Version 11.0.614.0

SELECT iosCD.IOS_APPLICATION_IDENTIFIER
from {Application} app
inner join {App_Mobile_Config} on app.[Key] = {App_Mobile_Config}.[Application_Key]
inner join OSSY@S_iOS_Config_Details iosCD on {App_Mobile_Config}.[Id] = iosCD.Id
where exists (select 1
              from {Application}
              inner join {App_Definition_Module} on {App_Definition_Module}.[Application_Id] = {Application}.[Id]
              inner join {Module} on {Module}.[Id] = {App_Definition_Module}.[Module_Id]
              inner join {Espace} on {Module}.[Espace_Id] = {Espace}.[Id]
              where {Espace}.[Name] = @Module 
              and {Application}.[Id] = app.Id)
Solution