Cloud-oriented Life

Cloud Native Technology Improves Lives

Fixing Failed to transform bcprov-jdk18on-1.78.1.jar

Problem

When building a Flutter APK with the command flutter build apk --release src/main.dart, the build process failed with the following error:

1
2
3
4
5
6
7
8
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':camera_android:generateReleaseLintModel'.
> Could not resolve all files for configuration ':camera_android:releaseUnitTestRuntimeClasspath'.
> Failed to transform bcprov-jdk18on-1.78.1.jar (org.bouncycastle:bcprov-jdk18on:1.78.1) to match attributes
> Execution failed for JetifyTransform: bcprov-jdk18on-1.78.1.jar.
> Failed to transform using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 65.

The error indicated that the Java class file major version 65 (which corresponds to Java 21) was incompatible with the current build environment. This incompatibility occurred during the Jetifier transformation process when trying to process the BouncyCastle cryptography library.

Read more »

Fixing the mysterious registry.nlark.com 404 in your Node project

The Error

1
2
npm ERR! network request to https://registry.nlark.com/dom-to-image/download/dom-to-image-2.6.0.tgz failed
npm ERR! code ENOTFOUND

You’ll usually see this when running npm install (or yarn install) on a project last updated a few years ago.

Read more »

Ensuring Unique Primary Keys in Drift: Auto vs Manual ID

When working with the Drift ORM in Flutter, ensuring that your table’s primary key remains unique is essential for reliable data management. Depending on your data model, Drift offers two simple yet powerful approaches to enforce uniqueness:

Read more »

Customizing /etc/hosts in Kubernetes Pods Using hostAliases

Introduction

In Kubernetes, managing hostname resolution for applications often requires overriding DNS settings or modifying container images. However, Kubernetes provides a simpler and cleaner solution: the hostAliases field. This feature allows you to inject custom entries into a Pod’s /etc/hosts file without altering the container itself.

In this blog, we’ll explore how to use hostAliases in Kubernetes Pods and Deployments, along with version requirements, practical examples, and troubleshooting tips.

Read more »

Uh Oh! Android Build Warning? Let’s Decode That SDK Version Message

Ever been happily building your Android app, only to be greeted by a cryptic warning message? You’re not alone! One common speed bump is the “SDK XML version” warning, often popping up when things aren’t quite aligned in your project setup. Let’s break down what this warning means and how you can usually fix it, without needing a computer science degree!

Read more »

Expanding Disk Space on CentOS 7.x

Running out of disk space on your Linux server? It’s a common problem, especially as your applications and data grow. Today, we’ll walk through a practical guide to expand disk space on a CentOS 7.x cloud server. We’ll cover expanding both the root partition and an LVM logical volume. Let’s dive in!

Read more »

Troubleshooting Kubernetes Pod Startup Issues: Image Pull Failures

Introduction

Recently, I encountered an issue where a Kubernetes (K8s) pod failed to start, getting stuck at:

1
Pulling image "docker.io/bitnami/minideb:stretch"

However, running docker images on the node showed that the image was already present.

1
2
docker images | grep bitnami/minideb
bitnami/minideb stretch e398a222dbd6 2 years ago 53.8MB
Read more »

Locked Out? Reset Your Sentry Admin Password with createuser

Forgot your Sentry admin password and can’t log in? Don’t panic! While password resets can sometimes be tricky, Sentry provides a straightforward command-line tool to create a new superuser account, effectively bypassing the login issue and granting you administrative access again. This guide will walk you through using the sentry createuser --superuser command to regain control of your Sentry instance.

Read more »

How to Enable Git LFS for a Repository and Track Large Files

Git Large File Storage (LFS) is an extension for Git that allows efficient handling of large binary files by storing them outside the main Git repository while keeping lightweight pointers in place. This helps prevent repository bloat and improves performance when working with large files.

In this guide, we’ll cover:

  1. How to enable Git LFS in a repository
  2. How to track common large file types using Git LFS
Read more »

Troubleshooting Access Denied Errors in Alibaba Cloud OSS

When working with Alibaba cloud storage, one of the most frustrating issues you can encounter is an “Access Denied” error, when you’re in the middle of transferring a file with ossutil. This blog post will walk you through a common issue related to Alibaba Cloud’s Object Storage Service (OSS) and how to quickly resolve it by properly configuring your ossutil tool.

Read more »
0%