projectlombok/lombok · error · AppException

File with bucket endpoint + credentials is not available…

Error message

File with bucket endpoint + credentials is not available. Make file <path>; it should contain something like: 
123456789abcdef0123456789abcdef0  # this is the access key
123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0  # this is the secret
https://12345.r2.cloudflarestorage.com   # this is the endpoint
lombok-data   # this is the bucket name

What it means

readCreds opens the credentials file via Files/Reader and lets NoSuchFileException (an IOException subclass) propagate to a dedicated catch that converts it into this AppException with a full how-to template. It fires when the configured creds file does not exist at all.

Solutions

  1. Create the file at the path shown in <path> with exactly 4 lines: accessKey, secretKey, endpoint URL, bucket name (template is embedded in the message).
  2. Example: '123456789abcdef0123456789abcdef0', the 64-char secret, 'https://12345.r2.cloudflarestorage.com', 'lombok-data'.
  3. Verify the path you configured / passed actually points to the file (use an absolute path to rule out cwd differences).
  4. On CI, provision the file from a secret store before running the publish step.

Example fix

// create the file at the reported path:
// before: (file missing -> NoSuchFileException)
// after (content of creds file):
123456789abcdef0123456789abcdef0
123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0
https://12345.r2.cloudflarestorage.com
lombok-data
Defensive patterns

Strategy: validation

Validate before calling

java.nio.file.Path p = java.nio.file.Paths.get(credsPath);
if (!java.nio.file.Files.isRegularFile(p)) throw new IllegalStateException("Creds file missing: " + p.toAbsolutePath());

Try / catch

// AppException is unchecked-style wrapper; guard the run
try {
    publish();
} catch (AppException e) {
    if (e.getMessage() != null && e.getMessage().startsWith("File with bucket endpoint + credentials is not available")) {
        createCredsFileFromTemplate(); // then retry
    } else throw e;
}

Prevention

When it happens

Trigger: Running the publish flow (go -> readCreds) with the creds-file path unset or pointing to a non-existent location — file never created, wrong path passed, file deleted, or path typo / wrong working directory.

Common situations: Fresh checkout or CI machine where the per-developer creds file was never provisioned; path relative to a different cwd; credentials file stored outside the repo and not recreated after a clean build.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of projectlombok/lombok@6d6a3e9fec (2026-09-07). Data as JSON: /api/errors/a8c15c23a3c533d9. Report an issue: GitHub.

Appendix: source

Thrown at src/support/lombok/publish/PublishToBucket.java:150

			List<String> lines = Files.readAllLines(path);
			String accessKey = null, secretKey = null, endPoint = null, bucketName = null;
			for (String line : lines) {
				int idx = line.indexOf('#');
				if (idx != -1) line = line.substring(0, idx);
				line = line.trim();
				if (line.isEmpty()) continue;
				if (accessKey == null) { accessKey = line; continue; }
				if (secretKey == null) { secretKey = line; continue; }
				if (endPoint == null) { endPoint = line; continue; }
				if (bucketName == null) { bucketName = line; continue; }
				throw new AppException("Too many lines in " + path.toAbsolutePath() + " - only 4 expected: " + LINE_DESCRIPTIONS);
			}
			if (bucketName == null) throw new AppException("Expected 3 lines in " + path.toAbsolutePath() + ": " + LINE_DESCRIPTIONS);
			creds = AwsBasicCredentials.create(accessKey, secretKey);
			endpoint = URI.create(endPoint);
			this.bucketName = bucketName;
		} catch (NoSuchFileException e) {
			throw new AppException("File with bucket endpoint + credentials is not available. Make file " + path.toAbsolutePath() + "; it should contain something like: \n" +
				"123456789abcdef0123456789abcdef0  # this is the access key\n" +
				"123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0  # this is the secret\n" +
				"https://12345.r2.cloudflarestorage.com   # this is the endpoint\n" +
				"lombok-data   # this is the bucket name");
		} catch (IOException e) {
			throw new AppException("I/O issue reading creds file " + path.toAbsolutePath() + ": " + e.getClass() + ": " + e.getMessage());
		}
	}
}

View on GitHub (pinned to 6d6a3e9fec)