Error while duplicating Oracle database after failover, using 11.2.0.4
The message indicates that no archivelog exists with this sequence in the current incarnation.

Failover starts a new incarnation, and log sequences start from 1 again. Let's say your database is at sequence 10 now, and the log sequence was 159 before the failover. V$ARCHIVED_LOG at this point still contains entries about previous incarnation, so the above query will return 159 because it doesn't consider the start of a new incarnation (resetlogs).

For these kind of queries always check resetlogs_change# or resetlogs_time, e.g:

select max(sequence#) from v$archived_log join v$database using (resetlogs_change#);


Fix this and try duplicating again. Or just skip the UNTIL clause and let log shipping take care of the archivelogs.