Skip to content

Plugin auth throw Unhandled Rejection at: Promise - Chaining cycle detected for promise #5207

@mkbam

Description

@mkbam

If a test case have a separate session function inside a Scenario and Data is passed multiple time then Plugin auth is throwing an error message of 'Chaining cycle detected for promise' when used with process.on('unhandledRejection', (reason, promise) => { console.error('Unhandled Rejection at:', promise, 'reason:', reason);});

It's trying to call [1] Retrying... Attempt #2 which is calling login and getting in infinite loop.

Sample Code:

`Data([
'a',
'b',
]).Scenario('issue', async({ current })=>{
login('userA');
I.click('sometext');
await session('sessionB', async ()=>{
login('userB');
// When test case run 2nd time with data 'b'
// It get issue on login funciton
// nhandled Rejection at: Promise {
// [TypeError: Chaining cycle detected for promise #]
//} reason: [TypeError: Chaining cycle detected for promise #]
//booststrap - unhandledRejection:
//[TypeError: Chaining cycle detected for promise #]

		//I am logged in as userB
		 //  userB: I am on page "/"
		 //  › [Url] https://lsite/login
		 //  › [Browser:Verbose] 
		 //[1] <check login> Retrying... Attempt #2			
		
		I.click('sometext');
		
	});

}).tag('@issue');`

some

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions