browserslist: Versions of a specific browser released since a date - browser

Our policy is to support the Desktop versions of Firefox, Chrome and Edge that were stable in the last year.
Example: Today is 2022-01-12, so we support the releases of Chrome since 2022-01-11 and the release that was stable back then: 78 (2020-11-17), 88 (2021-01-19), 89 (2021-03-02), ..., 97 (2022-01-04)
My first try was: Chrome since 2021-03 which resulted in this error: Unknown browser query 'Chrome since 2021-03'. Maybe you are using old Browserslist or made typo in query.
Following the grammar I tried: Firefox and since 2021-03 but received: Specify versions in Browserslist query for browser Firefox
Since there is nothing like all Firefox versions I came up with: last 99 Chrome versions and since 2021-01-12
Although this works, I feel there must be a better option.

I believe the syntax you usually use is since YYYY-MM/-DD and browser_x > 0 so for chrome you could write since 2021-01-12 and chrome > 0.

Related

Was ExtensionSidebarPane broken in Chrome 92 upgrade?

I released a Chrome DevTools extension a couple years ago that uses
chrome.devtools.panels.elements.createSidebarPane(title, callback)
to add an ExtensionSidebarPane. This worked fine until Chrome 92. Now the Pane is created with the title, but it is blank.
The calls I am using are still documented: https://developer.chrome.com/docs/extensions/reference/devtools_panels/, but the example code that I used has been moved to into the mv2-archive section of the google-extension-samples repo. And the chrome-query example code no longer works either. So maybe that means it is unsupported now. On the other hand, everything I have found so far seems to say v2 should be supported to the end of 2021. And I haven't found any alternative v3 examples of adding info to the devtools UI.
Obviously createSidebarPane is getting called, because the blank pane is created with the expected title. And intentionally throwing an error in the callback shows that it is getting called with the expected ExtensionSidebarPane object as a parameter, it's just that calling setExpression or setObject on it doesn't do anything. I am not seeing any other errors or warnings.
I would hate to retire my extension, since I know people use it, but I am not sure what else to try.

Problem with Chrome headless from CLI: empty PDF and error "Failed to serialize document: Uncaught"

My web application generates a PDF from an HTML page via Google Chrome 76.0.3809.100 headless on Debian GNU/Linux 9.9 (stretch). My call looks like this:
google-chrome --headless --ignore-certificate-errors --hide-scrollbars --print-to-pdf='mypdf.pdf' --run-all-compositor-stages-before-draw --no-sandbox --virtual-time-budget=60000 https://example.com/mypage.html
Everything works perfectly... about 9 times out of 10. But sometime I got an empty PDF.
I thought it was a bug in my code, so I tried to run the same command from the command line directly. I also added --dump-dom to exclude the PDF generation and display the HTML on the console. Again, about 9 times out of 10 it works, one... it doesn't.
When it doesn't, I get this error:
[0814/090047.461433:ERROR:headless_shell.cc(434)] Failed to serialize document: Uncaught
Well, actually this is my full console output, but all the other messages are there also when it runs OK, so I don't think they matter:
Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank"
Fontconfig warning: ignoring UTF-8: not a valid region tag
[0814/090046.673042:ERROR:command_buffer_proxy_impl.cc(107)] ContextResult::kTransientFailure: Shared memory region is not valid
[0814/090046.674622:WARNING:ipc_message_attachment_set.cc(49)] MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[0814/090046.736342:ERROR:cert_verify_proc_nss.cc(969)] CERT_PKIXVerifyCert for example.com failed err=-8102
[0814/090047.461433:ERROR:headless_shell.cc(434)] Failed to serialize document: Uncaught
[0814/090047.474334:ERROR:browser_process_sub_thread.cc(203)] Waited 3 ms for network service
Ok, so back to "my bad" route. I switched https://example.com/mypage.html to https://google.com and... lo and behold! Same "sometime" error!
I'm fresh out of ideas, even more since I cannot replicate the behaviour in a consistent manner: sometime it works, sometime it doesn't.
Any help is appreciated, thanks!
Ok, I reported this to the Chromium devs as Issue 993686. It was recognized as a bug in Chromium.
As a workaround, I removed som aync-loaded fonts I had in my CSS and now it works 10/10.

Get latest release version number for chrome browser

I am trying to figure out a rather stable way to programmatically determine the latest release version number of the chrome browser.
It doesn't have to be failproof as it's only a nice-to-have-feature I can blend out whenever the result looks "suspicious".
There seems to be no API (is there?).
I dont want to rely on third parties handling that stuff manually.
I dont want to parse any website output.
So I ended up fetching git files.
My first approach was to fetch this file:
https://chromium.googlesource.com/chromium/src.git/+/master/chrome/VERSION?format=TEXT
Which gives the latest version number.
From there on the solution is just a preg_match_all away ...
Unfortunately its not the latest release version but the latest dev version.
There seems to be no "release" branch nor a "release" tag or something else I can think of neither.
You might answer "why?"... I know about feature detection, I know browser sniffing can be fooled and I am aware of the fact that (every) browser will notify their users when it's time to update. Still makes sense in my case. On the other hand its solely for display purposes. Nothing is going to depend on it later on – promise :-)
Any – even the faintest – ideas are highly appreciated!
The Chrome team uses the OmahaProxy dashboard to keep track of current versions in stable/beta/dev/canary. If you can scrape that you can get whatever version number you're looking for.
I've found the following endpoints from OmahaProxy that give the latest stable versions of the respective OS.
Windows: https://omahaproxy.appspot.com/win
Linux: https://omahaproxy.appspot.com/linux
Mac: https://omahaproxy.appspot.com/mac
Feel free to use my online service vergrabber to get latest versions of different kind of software in json format.
It's available at http://vergrabber.kingu.pl/vergrabber.json
If you're on debian based linux, you could install and update your chrome once a day, and somehow parse the version number, but this is not realtime.
For example:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome-stable_current_amd64.deb
Which will give a log like this:
(Reading database ... 113338 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (48.0.2564.97-1) over (47.0.2526.111-1) ...
Setting up google-chrome-stable (48.0.2564.97-1) ...
Processing triggers for menu (2.1.47) ...
Then just parse it.
The ChromiumDash also makes the data available via an API. You can use that to fetch the latest tag for a platform and a channel.
Eg: https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Windows&num=1
Returns
[
{
"channel": "Stable",
"chromium_main_branch_position": 950365,
"hashes": {
"angle": "343b7bb57268e1cb47da26fcb0ed40fe47e8ff5d",
"chromium": "cab11adacc41ee856c79e669c2fd38d8864e52c4",
"dawn": "1b1b658d365591b6a8d4bfb0c3524832c89afc99",
"devtools": "b6f648d8921ea8be8f2b32c2061fec7503b56610",
"pdfium": "27cabf3dae38d0634a53316da0ad069bf0413495",
"skia": "a6986cd7224f104044fd5bc29cb5f80796d76f5a",
"v8": "db77a493a5595b835655b243202ac0c2fb1898a6",
"webrtc": "a6b138d6b4ef3a5b2c87f899b67f3b5c8dd3c002"
},
"milestone": 98,
"platform": "Windows",
"previous_version": "98.0.4758.81",
"time": 1643754840000,
"version": "98.0.4758.82"
}
]

SDCC valid device list is missing devices

I'm rebuilding a sdcc compiler after a mishap with my old system. I had been able to build on a pic18F4410, but my new setup does not include that in its valid device list.
The device list it is calling valid looks very small.
sdcc --use-non-free -mpic16 -p18f4410 test_blinkall.c
'18f4410' was not found.
Valid devices are:
p18f242 p18f248 p18f252 p18f258
p18f442 p18f448 p18f452 p18f458
p18f1220 p18f1320 p18f2220 p18f2320
p18f2455 p18f2550 p18f4220 p18f4320
p18f4331 p18f4455 p18f4520 p18f6520
p18f6620 p18f6680 p18f6720 p18f8520
p18f8620 p18f8680 p18f8720
I'm not sure where this device list is getting pulled from. I had it working once before(Using that exact compile line), so I'm sure the solution is out there somewhere...
I'd like to get that list updated with pretty much all supported PIC18 devices.
SDCC version:
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.5.6 #1249 (Sep 2 2015) (UNIX)
Got it working - followed some instructions somewhere on installing SDCC via CVS checkout/compile. Checks out the latest of an old version. New version is 3.5, not 2.5.6.
Downloaded 3.5 release. Works fine.

How to build and run Light Table without error?

I've been trying for hours, but can't build and use Light Table. Every time I try to run deploy/LightTable, it hangs on a screen that simply says "Light Table". I receive this error*:
[14381:0519/204037:INFO:CONSOLE(27860)] "Uncaught TypeError: Cannot read property 'thread_STAR_' of undefined", source: file:///home/zaz/Desktop/LightTable/builds/lighttable-0.8.0-linux/resources/app/core/node_modules/lighttable/bootstrap.js (27860)
Here's what I've tried:
git clone https://github.com/LightTable/LightTable.git
cd LightTable
bash linux_deps.sh
./deploy/LightTable # creates frozen window, throws the error above
cd deploy
./LightTable # creates frozen window, throws the error above
./ltbin # creates frozen window, throws the error above
I also tried similar things after checking out the atom-shell branch and the 0.7.2 tag (and cleaning up all the files from the previous build). Each time, I received the error above.
Does anyone know what's going on here?
Has Light Table been completely abandoned? It seems the last commit was in March.
* Depending on the version I was trying to run, I also received other errors, but I don't think they're relevant (the error above was the only one that appeared for all versions):
[18593:0519/222845:INFO:gpu_info_collector_x11.cc(80)] NVCtrl extension does not exist.
[18593:0519/222845:ERROR:browser_main_loop.cc(226)] Gdk: gdk_window_set_icon_list: icons too large
Fontconfig warning: FcPattern object size does not accept value 11(i)
[14413:0519/204035:INFO:renderer_main.cc(212)] Renderer process started
A year later (question was written in May 2015, now is June 2016), LightTable 0.8.1 is out, and I tried both Linux binary and cloned it from git, and it works fine.
For complete info, I'm using also Atom, and although I had not problems with "Cannot read property 'something' of undefined"" in Atom core, I met such problems in two or three Atom packages.
Both editors are based on same electron platform, LightTable is beautiful eye candy with quite revolutionary REPL integration, but it needs more polish to be usable to same extent as Atom.
For example, LightTable does not have workspace saving by default, that is done via plugin. That's ridiculous.
But although Atom looks so nice and powerful compared to simple editors, with realy huuuge number of available packages/plugins, LightTable is more elegant.
As I don't want to start new semi-religious war Atom vs LightTable resembling vi-vs-emacs, I'll stop here. :)
I can't replicate your problems in LightTable v0.8.1, so I think that answers this question. If not, please add errors you get with v0.8.1.
For info about releases, please check: https://github.com/LightTable/LightTable/releases

Resources