@@ -326,6 +326,7 @@ <h2>Control</h2>
326326 < strong > Erase</ strong > does a full flash erase < span class ="mono "> (esptool erase-flash)</ span > before writing the images.
327327 Only enable it when you have OTA partitions / old firmware and you see bootloops or slot errors.
328328 This web flasher seeds both OTA slots by default by writing the app to < span class ="mono "> 0x20000</ span > and < span class ="mono "> 0x410000</ span > .
329+ If the log shows < span class ="mono "> Flash ID: 0</ span > or an MD5 mismatch, reconnect in ROM mode and retry at < span class ="mono "> 115200</ span > .
329330 Note: it wipes anything stored in flash (including NVS settings like Wi-Fi creds/config).
330331 </ div >
331332 < div class ="progress " aria-label ="Flash progress ">
@@ -388,7 +389,7 @@ <h2>Browser support</h2>
388389 </ div >
389390 < footer >
390391 Product of < a href ="https://github.com/C5Lab/projectZero/ "> C5Lab/projectZero</ a > -
391- < span id ="pageVersion " class ="mono "> Web flasher v1.0.4 </ span > .
392+ < span id ="pageVersion " class ="mono "> Web flasher v1.0.5 </ span > .
392393 </ footer >
393394
394395 < script type ="module ">
@@ -418,6 +419,7 @@ <h2>Browser support</h2>
418419
419420 const state = {
420421 manifest : null ,
422+ manifestUrl : null ,
421423 latestRelease : null ,
422424 files : [ ] ,
423425 port : null ,
@@ -437,7 +439,7 @@ <h2>Browser support</h2>
437439 monitorConnected : false ,
438440 } ;
439441
440- const PAGE_VERSION = "1.0.3 " ;
442+ const PAGE_VERSION = "1.0.5 " ;
441443 const monitorEncoder = new TextEncoder ( ) ;
442444
443445 const sleep = ( ms ) => new Promise ( ( r ) => setTimeout ( r , ms ) ) ;
@@ -538,10 +540,19 @@ <h2>Browser support</h2>
538540 } catch { }
539541 let cleaned = path . startsWith ( "/" ) ? path . slice ( 1 ) : path ;
540542 const branch = getBranch ( ) ;
541- if ( cleaned . startsWith ( "firmware/" ) ) {
543+ const manifestUrl = state . manifestUrl || getManifestUrl ( ) ;
544+ const manifestHost = ( ( ) => {
545+ try {
546+ return new URL ( manifestUrl ) . hostname ;
547+ } catch {
548+ return "" ;
549+ }
550+ } ) ( ) ;
551+ if ( manifestHost === "raw.githubusercontent.com" && cleaned . startsWith ( "firmware/" ) ) {
542552 cleaned = cleaned . replace ( / ^ f i r m w a r e \/ / , "ESP32C5/binaries-esp32c5/" ) ;
553+ return `https://raw.githubusercontent.com/C5Lab/projectZero/${ branch } /${ cleaned } ` ;
543554 }
544- return `https://raw.githubusercontent.com/C5Lab/projectZero/ ${ branch } / ${ cleaned } ` ;
555+ return new URL ( cleaned , manifestUrl ) . toString ( ) ;
545556 } ;
546557
547558 const getBranch = ( ) => ui . branch . value || "main" ;
@@ -618,6 +629,7 @@ <h2>Browser support</h2>
618629 if ( usedManifestUrl ) log ( `Manifest: ${ usedManifestUrl } ` ) ;
619630 const manifest = rewritePartsForBranch ( manifestRaw , getBranch ( ) ) ;
620631 state . manifest = manifest ;
632+ state . manifestUrl = usedManifestUrl || primary ;
621633 let releaseLabel = manifest . version || "n/a" ;
622634 if ( getBranch ( ) === "main" ) {
623635 try {
@@ -959,6 +971,7 @@ <h2>Browser support</h2>
959971 } ) ;
960972 ui . branch . addEventListener ( "change" , ( ) => {
961973 state . manifest = null ;
974+ state . manifestUrl = null ;
962975 ui . manifest . style . display = "none" ;
963976 ui . manifest . textContent = "" ;
964977 ui . releaseInfo . textContent = "Loading manifest" ;
0 commit comments