Wednesday, October 20, 2021

Oracle Virtualbox crashing (aborting) on macOS [Solved]

 I run into issues every time I update my VirtualBox version on my MacBook Pro. If you run into issues where you can't start a VM instance, try this fix.

Open Virtualbox >> Go to your VM image >> Click on Settings >> Go to Audio >> Uncheck the "Enable Audio" box.

Binary file (standard input) matches


Error code:

$ sudo cat /var/log/syslog | grep "tree"
Binary file (standard input) matches


Solution:

$ sudo cat /var/log/syslog | grep "tree" --text
Jul 14 17:43:00 osboxes kernel: [    3.042582] vboxguest: loading out-of-tree module taints kernel.
Jul 15 13:24:47 osboxes kernel: [    3.420002] vboxguest: loading out-of-tree module taints kernel.
Jul 15 13:54:22 osboxes kernel: [    3.027623] vboxguest: loading out-of-tree module taints kernel.
Sep 28 12:59:21 osboxes kernel: [    3.165531] vboxguest: loading out-of-tree module taints kernel.
Sep 28 13:46:04 osboxes kernel: [    2.755048] vboxguest: loading out-of-tree module taints kernel.
Sep 28 13:51:08 osboxes kernel: [    3.508174] vboxguest: loading out-of-tree module taints kernel.
Oct 19 21:04:41 osboxes kernel: [    2.762903] vboxguest: loading out-of-tree module taints kernel.
Oct 19 21:11:51 osboxes kernel: [    2.566860] vboxguest: loading out-of-tree module taints kernel.

Sunday, October 17, 2021

[Solved] 'cryptopp/aes.h' file not found; Expected namespace name

If you are facing errors like "'cryptopp/aes.h' file not found" or getting "Expected namespace name" error for "using namespace CryptoPP;" or similar compilation errors, refer to the following settings:

  • Add "/usr/local/include" in Header search paths
  • Add "/usr/local/lib" in Library search paths
  • Add -lcryptopp as a Linker flag

Refer to this article for more information: https://com.puter.tips/2021/02/how-to-use-cryptopp-in-xcode.html

[How To] Use Boost in Xcode

Using Boost C++ Libraries (https://www.boost.org/) is relatively easier than setting up Cryptopp. [Ref.: https://com.puter.tips/2021/02/how-to-use-cryptopp-in-xcode.html]

Step-1: Install boost libraries
$ brew install boost
Step-2: Link boost in Build Settings
  • Navigate to Linking >> Other Linker Flags
  • Add following flags as per your requirement
    • -lboost_chrono
    • -lboost_system
    • -lboost_timer
    • -lboost_regex

[Solved] code signature not valid for use in process using Library Validation

So I was working on a C++ project on Xcode, and I updated to the latest version of Xcode with recommended default settings; then I started having the following errors:

dyld: Library not loaded: /usr/local/lib/libcryptopp.dylib

  Referenced from: /Users/devharsh/Library/Developer/Xcode/DerivedData/server-bohvcuztzndrrzhcoglrvuijfasj/Build/Products/Debug/server

  Reason: no suitable image found.  Did find:

/usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

/usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

/usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

Program ended with exit code: 9


Solution:
  • Go to Xcode > Targets > Build Settings
  • Scroll down and go to the Signing tab
  • Click on "Enable Hardened Runtime" and set it to "No"
  • Recompile, and it should be fixed


Thursday, October 14, 2021

[Solved] Google Sign-in Error: "sign in using your corporate mobile device"

The error when you try to sign in to any Google service like Youtube or Google Drive from a corporate account:

"We detected an unusual sign-in attempt. To ensure that someone else isn't trying to access your account, your organization needs you to sign in using your corporate mobile device (the phone or tablet you normally use to access your corporate account). If you don't have your corporate mobile device with you right now, try again later when you have your corporate mobile device with you. If you continue to have problems signing in, contact your administrator."


To suppress this warning, you can:
  • Go to Users >> Open the user account
  • Go to "Login challenge."
  • Click on "Turn off for 10 mins."
  • Try to log in again, and it should be fine