Hari ini saya mendapati error dari playwright
browserType.launch: Protocol error (Browser.enable): Browser closed. ==================== Browser output: ==================== <launching> /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/firefox -no-remote -headless -profile /home/jaranguda/tmp/playwright_firefoxdev_profile-6JsjrN -juggler-pipe -silent <launched> pid=25600 [pid=25600][err] XPCOMGlueLoad error for file /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/libmozgtk.so: [pid=25600][err] /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib64/libicuuc.so.69) [pid=25600][err] Couldn't load XPCOM. =========================== logs =========================== <launching> /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/firefox -no-remote -headless -profile /home/jaranguda/tmp/playwright_firefoxdev_profile-6JsjrN -juggler-pipe -silent <launched> pid=25600 [pid=25600][err] XPCOMGlueLoad error for file /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/libmozgtk.so: [pid=25600][err] /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib64/libicuuc.so.69) [pid=25600][err] Couldn't load XPCOM. ============================================================
Dilihat dari log diatas yang bermasalah ada di file /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/libstdc++.so.6
, mari kita cek GLIBCXX dari file tersebut
strings /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/libstdc++.so.6 | grep GLIBCXX # output GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 GLIBCXX_3.4.20 GLIBCXX_3.4.21 GLIBCXX_3.4.22 GLIBCXX_3.4.23 GLIBCXX_3.4.24 GLIBCXX_3.4.25 GLIBCXX_3.4.26 GLIBCXX_3.4.27 GLIBCXX_3.4.28 GLIBCXX_DEBUG_MESSAGE_LENGTH
memang benar GLIBCXX_3.4.30 tidak ditemukan, cek shared library yang digunakan oleh Firefox tersebut
$ ldd /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/firefox linux-vdso.so.1 (0x00007fff5ddae000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc4913a2000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fc49139d000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fc491169000) libm.so.6 => /lib64/libm.so.6 (0x00007fc49108b000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc49106b000) libc.so.6 => /lib64/libc.so.6 (0x00007fc490e68000) /lib64/ld-linux-x86-64.so.2 (0x00007fc49148c000)
libstdc++.so.6
menggunakan /lib64/libstdc++.so.6
Cek kembali GLIBCXX,
$ strings /lib64/libstdc++.so.6 | grep GLIBCXX # output GLIBCXX_3.4 GLIBCXX_3.4.1 GLIBCXX_3.4.2 GLIBCXX_3.4.3 GLIBCXX_3.4.4 GLIBCXX_3.4.5 GLIBCXX_3.4.6 GLIBCXX_3.4.7 GLIBCXX_3.4.8 GLIBCXX_3.4.9 GLIBCXX_3.4.10 GLIBCXX_3.4.11 GLIBCXX_3.4.12 GLIBCXX_3.4.13 GLIBCXX_3.4.14 GLIBCXX_3.4.15 GLIBCXX_3.4.16 GLIBCXX_3.4.17 GLIBCXX_3.4.18 GLIBCXX_3.4.19 GLIBCXX_3.4.20 GLIBCXX_3.4.21 GLIBCXX_3.4.22 GLIBCXX_3.4.23 GLIBCXX_3.4.24 GLIBCXX_3.4.25 GLIBCXX_3.4.26 GLIBCXX_3.4.27 GLIBCXX_3.4.28 GLIBCXX_3.4.29 GLIBCXX_3.4.30 GLIBCXX_DEBUG_MESSAGE_LENGTH
kalo dilihat dari output tersebut harusnya sudah sesuai, untuk solusi (sementara), kita gunakan file libstdc++.so.6
dari system
# backup libstdc++.so.6 mv /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/libstdc++.so.6 ~/ # symbolic link dari system ln -s /lib64/libstdc++.so.6 /home/jaranguda/.cache/ms-playwright/firefox-1323/firefox/libstdc++.so.6
jalankan kembali playwright
npx playwright test
Firefox berjalan dengan normal