brew update – display error “DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.IDESimulatorAvailability ” and want install “clang”

While executing brew update – I get following error code + pop up window from mac os telling me to install “clang”. This process repeat each time.

xcodebuild[2122:12638] [MT] DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.IDESimulatorAvailability (/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin), error = Error Domain=NSCocoaErrorDomain Code=3588 "dlopen(/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, 0x0109): Symbol not found: (OBJC_CLASS$_SimDiskImage)
Referenced from: '/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability'
Expected in: '/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator'" UserInfo={NSLocalizedFailureReason=The bundle couldn’t be loaded., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, NSDebugDescription=dlopen(/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, 0x0109): Symbol not found: (OBJC_CLASS$_SimDiskImage)
Referenced from: '/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability'
Expected in: '/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator', NSBundlePath=/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin, NSLocalizedDescription=The bundle “IDESimulatorAvailability” couldn’t be loaded.}, dyldError = dlopen(/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability, 0x0000): Symbol not found: (OBJC_CLASS$_SimDiskImage)
Referenced from: '/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin/Contents/MacOS/IDESimulatorAvailability'
Expected in: '/Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator'
2022-10-18 10:11:18.484 xcodebuild[2122:12638] [MT] DVTAssertions: ASSERTION FAILURE in /System/Volumes/Data/SWE/Apps/DT/BuildRoots/BuildRoot2/ActiveBuildRoot/Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-21304/DVTFoundation/PlugInArchitecture/DataModel/DVTPlugIn.m:374
Details: Failed to load code for plug-in com.apple.dt.IDESimulatorAvailability (/Applications/Xcode.app/Contents/PlugIns/IDESimulatorAvailability.ideplugin)

Solution for following error is executing:

xcodebuild -runFirstLaunch

This copy of the Install OS X El Capitan application can’t be verified. It may have been corrupted or tampered with during downloading

Recently I got this error message while trying install El Capitan on iMac from mid 2007. I tried changing date (common know certificate problem) – but it did not resolve problem.

I downloaded image from two sources (including official Apple servers) they got exactly same SHA1 and comments of people state it was working.

Because of that I decide use most hardest way – installing MAC-os in unattended way that bypass any check(s).

Boot from created install media & instead starting installation open terminal and execute following command:

installer -pkg /Volumes/Mac\ OS\ X\ Install\ DVD/Packages/OSInstall.mpkg -target /Volumes/iMacHDD

iMacHDD – this is bootable volume name for HDD that You want install Your mac-os (you get it from using disk manager).

/Volumes/Mac\ OS\ X\ Install\ DVD/Packages/OSInstall.mpkg – this is patch to install disk (in my case that was usb-drive)

After executing that command & long wait macOS was installed in unattended way -when it finish just restart computer removing usb media. It will boot straight into new OS and allow first configuration + create new account.

Motorola Mototrbo TRBOnet TextMessenger (download)

Latest version – allow sending text messages / files to Motorola Mototrbo radios.

Polish T2 Tactical VHF Manpack Two Way Radio

Programming Tutorial:

Technical Instruction + Schematics (digitalised by Henri call sign: OH6CMM )

NSS6000 Linksys Cisco NAS Server U1 Rack – Firmware Update + Discovery Tool + Recovery

Start update from oldest to newest (if You try latest it will fail as corrupted – most like they change way of signing image and it fail check if trying update latest)

[Mac Monterey / Brew] keep showing (using) wrong (old) version of NPM / Node – when trying to reinstall / link – say it’s already done!

Today I have quite funny experience, I tried update node & npm to newest version but i get information it is already installed.

brew unlink node && brew link node
Unlinking /usr/local/Cellar/node/17.4.0… 7 symlinks removed.
Linking /usr/local/Cellar/node/17.4.0… 7 symlinks created.

trying check version show wrong one

npm -v
6.14.15
node -v
v12.22.9

I tried everything, from uninstalling, brew cleanup, link, relink, overwrite – without success.

Solution, edit file (in homedirectory):

.zshrc

In content locate & remove line:

export PATH="/usr/local/opt/node@12/bin:$PATH"

After removing restart computer and confirm correct version of node

npm -v
8.3.1
node -v
v17.4.0

Mission successful

APT-GET An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/ubuntu focal InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29

An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/ubuntu focal InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29

Solution

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 467B942D3A79BD29

If “467B942D3A79BD29” is different – just change it for value from error message.

WordPress REST API – when calling return VALID JSON but it fail to decode in PHP (AKA UTF-8 BOM \ufeff)

Quite interesting story, we have website running WordPress with two noticed problems:

  • After making call to REST API it return valid JSON response (debugged in Postman) but when trying raw json_decode in PHP it fail.
  • In PHP, after echoing (readfile) random file into client (wget), SHA1 sum of file on server and downloaded does NOT match, but content of downloaded file is exactly the same (tested via FileMerge)
  • Opening downloaded file in PHPStorm does not reveal any special characters in downloaded or original file

Trying this malformed CURL command reveal hidden from naked eye problem.

curl -d "auth=something" -X POST https://somewebsite.com/index.php\?rest_route\=/plugin/route/test --trace-ascii --

CURL pass raw output to terminal, terminal report unknown command (code was only used to diagnose) it’s malformed and sould not be used since it can execute arbitrary code!!!!

In front of JSON data there is UTF-8 BOM code (\ufeff) (it’s being ignored by most of application but not all, it should never be present in JSON response since encoding is send in HTTP header – some code is ignoring it, some will fail on decode JSON and thread it as invalid syntax.

When we know what to look for, we need scan all PHP files on server and locate ( 0xEF, 0xBB, 0xBF ) string in root website directory using following command:

grep -rlI $’\xEF\xBB\xBF’ .

From result ignore anything that is not .PHP since those files can have BOM and not directly parsed via PHP interpreter.

Download those PHP file and examine with “HexEditor” reveal BOM before PHP code that is being send along ANY content served from PHP.

Cleaning file from “BOM” mark (on MAC):

 sed $’1s/\xef\xbb\xbf//’ < in8sync-customization.php > clean-in8sync-customization.php

Compare two files together to make sure only BOM is removed.

Upload cleaned file in original location and repeat process if there is more than one. Be happy fixing unusual issue!!


Warning: Undefined array key 0 in /www/wwwroot/electronicnoobblog.com/wp-content/plugins/wp-google-analytics-scripts/wp-google-analytics-scripts.php on line 602