Several users are encountering a perplexing issue while using my web application.
During their usage, they click on a button or link that redirects them to another page, but encounter a "page not found" error with a URL like:
undefined
I initially suspected a javascript bug in my app: a redirect triggered by selecting a page name (potentially with parameters) where one value is incorrect, resulting in the page name being set to "undefined". However, there is no such code present in my app, and this problem occurs on various pages at random.
It appears to occur more frequently when users initially log in by clicking a link in a Gmail email message. Yet, a user who manually entered the link into a browser window reported the same issue. Some online research hints at potential Google redirection or caching processes taking place behind the scenes.
Any insights?
Edit:
Seeking input from individuals knowledgeable about how Gmail links function; which SO tags attract Google experts?
Edit 2:
Offering a bounty for the top answer sharing helpful information and temporary workaround suggestions. Still open to discovering the actual resolution to the problem, hence not considering the workaround as a definitive solution.