<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dan Edwards on Medium]]></title>
        <description><![CDATA[Stories by Dan Edwards on Medium]]></description>
        <link>https://medium.com/@dan_97235?source=rss-78b9823c22b0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*33Hh_BxKjCqg_HlF7Qu3cQ.jpeg</url>
            <title>Stories by Dan Edwards on Medium</title>
            <link>https://medium.com/@dan_97235?source=rss-78b9823c22b0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:28:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dan_97235/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Sirens, Sagas, and Stack Traces: A React Native Upgrade Odyssey]]></title>
            <link>https://shift.infinite.red/sirens-sagas-and-stack-traces-a-react-native-upgrade-odyssey-52db6beb0aac?source=rss-78b9823c22b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/52db6beb0aac</guid>
            <category><![CDATA[react-native-development]]></category>
            <category><![CDATA[react-native-guide]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-native-developers]]></category>
            <category><![CDATA[react-native-tips]]></category>
            <dc:creator><![CDATA[Dan Edwards]]></dc:creator>
            <pubDate>Wed, 30 Apr 2025 16:57:59 GMT</pubDate>
            <atom:updated>2025-04-30T16:57:59.168Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>⚡ </em><strong><em>Just here for the upgrade tips?</em></strong><em> </em>Scroll to the bottom for the “Practical Advice from The Odyssey” section.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0KA5i2Bo-5JHEOIjAgz6Sw.jpeg" /><figcaption>Joseph Mallord William Turner (1775–1851), Ulysses Deriding Polyphemus (1829), oil on canvas, 132.7 × 203 cm, The National Gallery, London. Wikimedia Commons.</figcaption></figure><h3>Intro:</h3><p><em>📨 “An urgent plea, with a clear path forward.”</em></p><p>The war was over. I’d successfully concluded my time in the trenches at a client and was looking forward to the next gig, with hope of a lighter load. That’s when I got a DM on Slack:<br> <strong>“Would you be interested in doing an upgrade for a client?”</strong></p><p>Since I had just finished an upgrade for the previous client, I thought, <em>“Yeah, why not. It shouldn’t be too hard.”</em></p><p>The client was prepared, with documentation about dependency version targets and an extensive upgrade guide. With the guiding path of the <a href="https://react-native-community.github.io/upgrade-helper/">React Native Upgrade Helper</a>,I figured the upgrade would be no problem.</p><p>What followed was a journey — an <em>Odyssey</em> — across nine React Native versions, fraught with monsters, misdirection, and divine StackOverflow interventions.</p><h3>Part I: The Trojan War Ends — The Illusion of Simplicity</h3><p>🛡️ <em>Seeing a path forward via the React Native Upgrade Helper</em></p><p>With the aid of the Upgrade Helper and the client’s documentation, starting at React Native version 0.67.4, I began my quest. I ran:</p><pre>npx @rnx-kit/align-deps --requirements react-native@0.77.0</pre><p>…and watched as the new dependency versions were targeted. I scoured the package.json to match other dependencies to the versions specified by the client and updated all of the native and config files to align with the new version.</p><p>Progress was quick. Then I ran:</p><pre>yarn</pre><p>Immediate failure.</p><p>How could this be?<br>Oh yeah — I forgot to remove the yarn.lock.</p><p>Success!</p><p>Next, let’s try to get a build going. I ran:</p><pre>yarn ios</pre><p>I expected the best. But instead, I was greeted by a forlorn:</p><pre>Pods/Development Pods/React-hermes/inspector-modern/chrome is missing:<br>#include &lt;hermes/inspector/RuntimeAdapter.h&gt; not found</pre><p>And so began my <strong>trial through native file challenges</strong>.</p><h3>Part II: The Sirens — Warnings That Weren’t Warnings</h3><p><strong>🧞‍♀️ </strong><em>Red herring errors that sidetrack you.</em></p><p>Our ship was a little beaten, but in calm waters. The shoreline stayed in sight as we avoided the dark clouds further out to sea. That’s when we began to hear the beautiful voices singing in a language we didn’t understand:</p><pre>&gt; Task :some_dependency-react-native:packageDebugResources FAILED</pre><p>Then we heard another song (error) we’d never heard before:</p><pre>Set: Entry, &quot;:CFBundleShortVersionString&quot;, Does Not Exist<br>Command PhaseScriptExecution failed with a nonzero exit code</pre><p>These were errors that were distracting from the real issues in the repository. Many times in our bare React Native app, on the Android side I would get errors about sub dependencies that were missing or missing values in an info.plist .</p><p>I listened harder and tried to not be pulled toward the rocks and the depths of the native files, but the pull was strong. Ultimately, we drifted off course and ran aground on a peculiar island with a dilating presence.</p><h3>Part III: Calypso’s Island — Trapped in Native Debugging Purgatory</h3><p>🏝️ <em>Debugging native files for what feels like eternity.</em></p><p>The native file island we found ourselves on was… thrilling, to say the least. I was solving errors quickly, flying from one issue to the next, getting that sweet dopamine hit with every successful pod install or resolved Gradle warning. It felt productive. Addictive, even. I <em>enjoyed</em> it.</p><p>But as the hours turned into days, and the fixes became increasingly specific — paths, headers, Xcode flags, compiler quirks — I started to ask myself:<br> <strong>Was I actually making progress?</strong><br> Or was I just building a really nice hut on the wrong island?</p><p>Like Odysseus on Calypso’s shores, I was comfortable — but no closer to home.</p><p>I needed to leave — or summon some otherworldly power to help steer me in the right direction.</p><h3>Part IV: The Underworld — Deep Stack Dives and LinkedIn Spirit Guides</h3><p><strong>🪦 </strong><em>Stack Overflow/GitHub spelunking and reaching out to a dev on LinkedIn.</em></p><p>I left the native file island behind, hoping for clarity. Instead, I descended into the Underworld.</p><p>This wasn’t just “debugging.” This was spelunking through abandoned GitHub issues, reading Stack Overflow answers from 2018, and piecing together fragments of conflicting advice from a dozen changelogs. Every path was dimly lit. Every solution ended with “hope that helps.”</p><p>And yet… I pressed on.</p><p>At one point, I tracked down a developer who had posted about a similar issue on SO months ago. They had the exact error I was facing — no one else had answered. Out of desperation, I sent a message on LinkedIn.</p><p>To my surprise, they replied.</p><p>That one conversation revealed what I couldn’t find in docs or forums:</p><blockquote><em>When upgrading your dependencies many versions alongside a large React Native version jump, those dependencies may now rely on </em><strong><em>React Native’s autolinking</em></strong><em> for native modules. That means manually declaring them in your Gradle and Podfiles is not only unnecessary — it might break your build.</em></blockquote><p>Three lines removed. Build passes. The way forward — finally illuminated.</p><h3>Part V: The Cyclops — Facing the New Architecture Blocker</h3><p><strong>👁️‍🗨️ </strong><em>The immovable dependency problem: can’t use new architecture.</em></p><p>I had assumed we’d be using the New Architecture. It was the way forward, after all — faster, more powerful, and clearly the future. So I did what any brave (but naive) hero might do: I set new_arch_enabled to true and kept building.</p><p>Then the strange errors started.</p><p>Fabric this. TurboModules that. Headers missing. Components failing to register. Everything pointed toward something deeper. Something architectural.</p><p>I had built my boat assuming we could sail into the new world — but I hadn’t checked the map.</p><p>That’s when I ran a full dependency audit using <a href="https://react-native-package-checker.vercel.app/">react-native-package-checker.vercel.app</a>. And there it was:<br> <strong>Several key dependencies didn’t support the New Architecture at all.</strong> This was a hard wall, not a speed bump.</p><p>Worse still, we had been targeting MMKV@3.2.0, which <em>requires</em> the New Architecture. No exceptions. That meant we had to downgrade to MMKV@2.12.2, the last stable version that ran on the old architecture.</p><p>But MMKV 2.x didn’t play nice with React Native 0.77.0.</p><p>We began hitting this error:</p><blockquote><em>❌ </em><em>MMKV: can&#39;t create a new instance of MMKV because of remote debugging</em></blockquote><p>A silent, persistent crash on startup — one that only appeared even with remote debugging apparently disabled.</p><p>So I made the call:<br><strong>Downgrade React Native itself to </strong><strong>0.76.7</strong> to align with MMKV and the rest of our stack.</p><p>It was frustrating. It felt like backtracking. But like Odysseus trapped in the Cyclops’s cave, brute force wasn’t the answer. We had to rethink our path, slip quietly out the side, and live to fight another day.</p><h3>Part VI: The Lotus Eaters — Lost in AI and Documentation Spirals</h3><p><strong>🌺 </strong><em>Too much helpful information. Too little progress.</em></p><p>After downgrading to 0.76.7, I should have felt closer to stability. But instead, I found myself surrounded by conflicting advice and overconfident suggestions—many of them from tools I typically trust.</p><p>ChatGPT, Claude, GitHub Copilot… all too eager to help.<br> They wanted to fix everything. Recommend everything. Change <em>everything</em>.</p><p>And with so many moving parts — from MMKV adjustments to config rewrites, from dependency cleanups to stray build warnings — I didn’t always know what <em>should</em> be changed. The volume of “possible fixes” drowned out the clarity of actual ones.</p><p>I found myself rewriting working configs, replacing plugins, renaming files — not because they were broken, but because an AI assistant or forum thread <em>suggested it might help.</em></p><p>It was seductive. I felt like I was making progress. But in reality, I was drifting. Making wide, unnecessary changes to code that no longer applied, based on assumptions from previous RN versions or tools that didn’t fully grasp my environment.</p><p>Like Odysseus’s crew among the Lotus Eaters, I wasn’t in pain — I was just forgetting where I was going.</p><p>Eventually, I had to close the tabs. Shut the bots up. Get back to the source. Look only at <em>my</em> code, <em>my</em> errors, and <em>my</em> changelogs.</p><p>Progress resumed.</p><h3>Part VII: Scylla and Charybdis — Refactor or Restart</h3><p><strong>⚔️ </strong><em>Stay in the cursed branch or restart with hard-won knowledge.</em></p><p>After circling the same issues for far too long — and getting conflicting advice from bots and blogs alike — I had to make a choice.</p><p>Stay the course on a branch riddled with unknowns, quick fixes, and duct-taped workarounds?</p><p>Or start fresh.</p><p>I chose the sea monster I hadn’t already angered: a clean branch.</p><p>I began porting over only what I trusted:</p><ul><li>A fresh package.json with known-good versions.</li><li>Vetted parts of the Android gradle files and the iOS Podfile.</li><li>A hard reversal of an earlier decision: <strong>replacing the Swift </strong><strong>AppDelegate with the original Objective-C one.</strong></li></ul><p>This wasn’t a blind reset — it was a surgical salvage. Every piece was carried forward <em>because</em> it had proven its worth or revealed its danger.</p><p>And once I did that?</p><p>The errors became… normal. Comprehensible. Debuggable.</p><p>✅ I built for iOS. <br>✅ I built for Android. <br>No native crashes.</p><p>I hadn’t avoided the monsters. But I’d finally steered a course between them — and survived.</p><h3>Part VIII: Circe’s Config Island — Metro, Babel, and the Time That Vanished</h3><p><strong>🔮 </strong><em>Metro + Babel config spirals.</em></p><p>With native builds finally working, I figured I was out of the woods.</p><p>But I wasn’t on land — I was on Circe’s island.</p><p>This is where <strong>Metro</strong>, <strong>Babel</strong>, and <strong>codegen</strong> lurked in the underbrush. And like Circe turning men into pigs, every small config tweak here had unforeseen consequences.</p><p>It started with a seemingly minor error in index.js.<br> The app crashed—but only on Android.<br> Performance.Provider was fine.<br> Adding the Redux Provider and store? Immediate failure.</p><p>So I began the ritual:</p><ul><li>Updated stale packages in package.json that had lingered from the earlier 0.77 attempt.</li><li>Bumped react-native-gesture-handler <em>back up</em> to stabilize things.</li><li>Nuked caches. Again.</li><li>Reinstalled Babel and Metro packages that had mysteriously disappeared.</li></ul><p>I added a missing main key to package.json.<br>I removed the codegenConfig block entirely.<br>None of it felt clean. All of it felt necessary.</p><p>We even updated files in core-mobile, just to be sure.<br>Eventually, pairing with <a href="https://infinite.red/team/frank-calise">Frank</a> from <a href="https://infinite.red/">Infinite Red</a> helped narrow the problem to a very specific hook call in sendbird/index.tsx.</p><p>Once we ensured all the Sendbird packages were compatible with RN 0.76 and added direct mappings in the metro.config.js, the bundle finally loaded.</p><p>It wasn’t any <em>one</em> fix. It was a series of spells reversed, bindings broken, and enchantments undone.</p><p>And then, finally, I left Circe’s Config island behind.</p><h3>Part IX: The Final Voyage — The Builds Work, but the Bugs Remain</h3><p><strong>⛵</strong><em> Everything compiles… and runtime errors greet you at the shore.</em></p><p>At last, the waters were calm.</p><p>With the app launching and the bulk of the issues behind me, I started testing actual features — <em>real</em> flows, not just empty screens.<br>No crashes.<br>✅ Mic permission? <br>✅ Motion access? <br>✅ Vital payment flows? <br>Even the client’s testing screen with native-bound components worked without a hitch.</p><p>It felt like I had made it. I updated the PR description with pride.</p><p>Then I looked at the CI logs.</p><p>Locally, iOS builds were stable. Android? Perfect.<br>CI? Not so much.</p><blockquote><em>❌ — iOS<br>❌ — Android</em></blockquote><p>So began <strong>the final voyage</strong> — not of coding, but of <strong>alignment</strong>. Local vs. CI, build cache vs. real-time, CircleCI vs. CircleTroll.</p><p>I compared local output to CI logs line by line.<br>Removed hard-coded hermes-engine references that had snuck in during earlier patching.<br>Suspected MMKV initialization was taking too long in CI; tried relying on cache. Considered bumping the timeout.</p><p>I even upgraded Xcode in CircleCI — just in case — and was met with success on the iOS front.<br>Android? Still spotty.</p><p>Slowly, one fix at a time, the CI builds came together.<br>The last flickers of instability, finally resolved.</p><p>The seas were rough. But I had sailed through them.</p><h3>Part X: The Return to Ithaca — Stability, At Last</h3><p><strong>🏠 </strong><em>Victory: Stable build, happy runtime, QA is content.</em><strong><br></strong>You don’t need a marching band for a React Native upgrade.</p><p>Sometimes, all you want is:</p><ul><li>A clean git diff</li><li>A green CI pipeline</li><li>And an app that launches without yelling at you</li></ul><p>That’s exactly what I got.</p><p>The builds were solid.<br>QA had nothing to report.<br>The app loaded. The runtime was quiet. No red screens. No cryptic Metro logs. No silent crashes when navigating to a screen.</p><p>And sure, no one will ever truly understand the depths this upgrade took me to. They’ll look at the PR and think, <em>“Oh, nice. Just a version bump.”</em></p><p>But <em>I</em> know.<br>And now, <em>you</em> do too.</p><p>I returned from the Odyssey.</p><p>( PS: To be clear, the client was actually thrilled and was very appreciative, but that’s not dramatic, now is it?)</p><h3>🧰 Practical Advice from the Odyssey</h3><p><em>(A summary for those who skipped the monsters and just want working builds)</em></p><h3>🧭 Start with the React Native Upgrade Helper</h3><p>The <a href="https://react-native-community.github.io/upgrade-helper/">React Native Upgrade Helper</a> gives you a clean, visual diff of what’s changed between versions. Use it to prepare file-level upgrades and get a baseline.</p><h3>🧼 Using Expo? Focus on the SDK version, not RN version</h3><p>If you’re working in an Expo-managed project, most native upgrade concerns are handled for you. Just align with the <a href="https://expo.dev/changelog">Expo SDK releases</a>, which bundle RN upgrades and maintain dependency safety.</p><h3>⚙️ Decide on New Architecture before you start</h3><p>New Architecture changes everything — Hermes integration, module behavior, and more. Know whether your dependencies support it by using <a href="https://react-native-package-checker.vercel.app/">react-native-package-checker.vercel.app</a>, and decide if you’re going to enable it <em>before</em> you dig in.</p><h3>🧪 Run <a href="https://react-native-package-checker.vercel.app/">react-native-package-checker</a> early</h3><p>Don’t wait to find out what breaks. This tool will tell you if your dependencies are New Architecture compatible — and which ones aren’t even close.</p><h3>📚 Actually read the changelogs</h3><p>The <a href="https://github.com/facebook/react-native/releases">React Native changelogs</a> are vital. They’ll tell you about renamed packages, broken configs, and migration steps the Upgrade Helper can’t show.</p><h3>🤖 Use AI — don’t follow AI</h3><p>ChatGPT, Claude, and Copilot can help interpret error logs or surface edge cases. But they don’t understand your entire setup. Don’t blindly apply suggestions — verify and contextualize.</p><h3>🔌 If you’re seeing native build errors, it’s probably linking</h3><p>Native issues often come down to mislinked modules. Check:</p><ul><li><strong>iOS:</strong> Podfile, ios/Podfile.lock, post-install scripts</li><li><strong>Android:</strong> app/build.gradle, build.gradle, settings.gradle, gradle.properties</li></ul><h3>🧩 JS errors? It’s probably a config or a dependency</h3><p>If your app boots but breaks at runtime, inspect:</p><ul><li>babel.config.js</li><li>metro.config.js</li><li>package.json fields (main, codegenConfig, react-native)</li><li>Watch out for version mismatches between peer dependencies</li></ul><h3>🩹 Patch-package with precision</h3><p>If you’re using patch-package, make sure the package version in yarn.lock or node_modules matches what you&#39;re patching. Otherwise, you’re maintaining ghost code.</p><h3>💥 Nuke caches more often than you think</h3><p>Weird build? Random error? Nuke everything:</p><ul><li>node_modules</li><li>ios/Pods</li><li>~/.gradle</li><li>npx react-native start --reset-cache</li></ul><h3>Thanks for reading. I hope this helps the next developer brave enough to chart their own path across a multi-version React Native upgrade.</h3><p>It won’t be easy. You’ll lose time. You’ll question your tooling. You’ll probably scream into a terminal window at least once.</p><p>But when you reach Ithaca — when the builds pass and the app launches — you’ll know the journey was worth it.</p><p>Good luck, sailor. ⚔️📱⛵</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52db6beb0aac" width="1" height="1" alt=""><hr><p><a href="https://shift.infinite.red/sirens-sagas-and-stack-traces-a-react-native-upgrade-odyssey-52db6beb0aac">Sirens, Sagas, and Stack Traces: A React Native Upgrade Odyssey</a> was originally published in <a href="https://shift.infinite.red/">Red Shift</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>