cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error on Logout event from SAP Build Work Zone in SAPUI5 page

guilherme_sales
Product and Topic Expert
Product and Topic Expert
0 Kudos
143

I am trying to attach a callback to the Logout event from the SAP Build Work Zone in my SAPUI5 application, to then request a logout in my approuter application. This is the logic I added to enable the event:

// UI5 Component
export default class Component extends UIComponent {
	//...
	public init(): void {
		//...

		// Log out when the user clicks the logout button in the shell header (BWZ)
		Container.attachLogoutEvent(() => {
			console.log("Logout event triggered, redirecting to logout endpoint.");
			window.location.replace('/do/logout');
		}, false)
	}
}

 The callback is working on my local tests, and I can see the log message on the console. However, when I try to do same thing inside our SAP Build Work Zone subscription, the callback doesn't run and we see a error message:

Screenshot 2025-06-17 at 4.35.14 PM.png

 After investigating the source files I notices this error happens when the Logout Event is being created and a deprecated part of the code executes. I wasn't able to find any configurations on SAP Build Work Zone that would fix it, but I might have missed something?

Has anyone else seen this error before? How can I contact the SAP Build Work Zone team to get support?

Thanks

 

Accepted Solutions (0)

Answers (0)