Frequent issues and how to troubleshoot them
If you are having troubly successfully completing an endlink flow, the most common mistakes are:
Browser limitations
Some older browsers do not support the localStorage
API, so our widgets will not work in those browsers, leading to users successfully
completing your flow but not publishing the corresponding data packet, losing profit potential. In other instances, the user may have disabled
localStorage in their modern browser manually for security reasons.
For these reasons, we recommend using the server-side examples for api calls or browser redirects as they result in more reliable outcomes.
Using a token twice leads to an error
If you try to use the same token for more than one call to any endlink endpoint, you will get an error after the first call, since they are single use only.
This can happen, for example, in React if you don't manage your state correctly and depend on useEffect to make the call.
Note that even though you get an error the second time, the original call succeeded so the user's data packet was published.
Your endlink url is not the actual final destination of a user when clicked.
If you're saving the token in the client, you have to make sure that the page the user lands on (the endlink url) is the actual final destination of the user in all circumstances. Meaning that you can't redirect users to log in or to a different page, unless you forward the url parameters from the original landing url so you can capture it later.
If you automatically redirect the user upon landing without forwarding url parameters, the client might start loading the page and it might even run some of the page's javascript before the redirect happens, so if you use the widget or client js to save the token, it won't be reliable and your completion endpoint call or widget will fail later, losing profit potential for your user.
A note on error logging
Under the best of circumstances, some errors might still result in a successful completion of your requirements without a successful call to the complete endpoint. For example there can be transient network errors when making the call to TARTLE.
In use cases where your use case involves a reward to your user, it's important to log any errors when calling the endlink endpoints alongside the token in question, so you can let us know and we can manually make sure the affected user is paid.