No session found for deeplink after visiting external page
On a mendix page, there is a link that goes to an external page. This external page also has a link that links back to the mendix page. The link from the external page back to the mendix page is a deeplink. The deeplink is configured where AllowGuests is true and the constant EnableKeepAlive is true. The sessiontimeout is set to an hour, in most cases this is enough time to have still a session when the user goes back from the external page to the mendix page. Multiple session per user are not allowed. The construction from the mendix page to the external page and back works in most cases. However, sometimes this results in an error when the user clicks on the external page on the deeplink to mendix. We have tried to reproduce the problem by Login, link from mendix to external page and back. Works From (1), when the session is active, login with this user from another location and do (1). Works Having multiple users in the system doing (1). Works. Hence, we cannot reproduce this, but the error is there. The error also appears right after log to Mendix, go to external page and back, so there shoot be an active session, also the deeplink url is valid. Anyone a suggestion? (please don't shoot on the active session from an hour, I don't like this too) The stacktrace: Jul 15 10:37:17.293 127.0.0.1 tr10000: DEBUG - DeepLink: No session found for deeplink: /link/vacatures/1724, attempting to serve link as guest. Jul 15 10:37:17.523 127.0.0.1 tr10000: ERROR - DeepLink: Error while serving deeplink: Jul 15 10:37:17.527 127.0.0.1 tr10000: ERROR - DeepLink: (1/1) com.mendix.systemwideinterfaces.core.UserException: An error occurred while setting the value for type DeepLink.DeepLink.
Maybe not for you anymore but in case more people are looking for this error after upgrading to Mendix 9. On localhost , it all works fine. However, on the cloud environments, you might get this or something that is preventing deeplink from working.
The solution is setting com.mendix.core.SameSiteCookies to None in your custom runtime settings
When using the deeplink from an external page, the deeplink is executed serverside as a guest (allowGuests), so in that case you cannot use the session of the logged in user, since the server doesn't know at that point who is using the link.
guess that's the issue