Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Briar Desktop Briar Desktop
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 170
    • Issues 170
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briar
  • Briar DesktopBriar Desktop
  • Issues
  • #173

Closed
Open
Created Dec 21, 2021 by Sebastian@sebkurMaintainer

Introduction with empty message raises exception

when making an introduction and leaving the introduction message blank I get this exception:

java.lang.IllegalArgumentException: null
	at org.briarproject.briar.introduction.MessageEncoderImpl.encodeRequestMessage(MessageEncoderImpl.java:114)
	at org.briarproject.briar.introduction.AbstractProtocolEngine.sendRequestMessage(AbstractProtocolEngine.java:115)
	at org.briarproject.briar.introduction.IntroducerProtocolEngine.onLocalRequest(IntroducerProtocolEngine.java:230)
	at org.briarproject.briar.introduction.IntroducerProtocolEngine.onRequestAction(IntroducerProtocolEngine.java:76)
	at org.briarproject.briar.introduction.IntroductionManagerImpl.makeIntroduction(IntroductionManagerImpl.java:363)
	at org.briarproject.briar.desktop.introduction.IntroductionViewModel$makeIntroduction$1.invoke(IntroductionViewModel.kt:77)
	at org.briarproject.briar.desktop.introduction.IntroductionViewModel$makeIntroduction$1.invoke(IntroductionViewModel.kt:74)
	at org.briarproject.briar.desktop.viewmodel.DbViewModel$runOnDbThread$1.invoke(DbViewModel.kt:29)
	at org.briarproject.briar.desktop.viewmodel.DbViewModel$runOnDbThread$1.invoke(DbViewModel.kt:26)
	at org.briarproject.briar.desktop.threading.BriarExecutorsImpl.onDbThread$lambda-0(BriarExecutorsImpl.kt:15)
	at org.briarproject.bramble.TimeLoggingExecutor.lambda$execute$0(TimeLoggingExecutor.java:35)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)

where I read:

    @Override
	public Message encodeRequestMessage(GroupId contactGroupId, long timestamp,
			@Nullable MessageId previousMessageId, Author author,
			@Nullable String text) {
		if (text != null && text.isEmpty()) {
			throw new IllegalArgumentException();
		}
		BdfList body = BdfList.of(
				REQUEST.getValue(),
				previousMessageId,
				clientHelper.toList(author),
				text
		);
		return createMessage(contactGroupId, timestamp, body);
	}

We copied from Android that the message is optional, and I just confirmed it is optional there, however, I don't know how. Maybe we replace a null message with an empty string there.

Edited Jan 11, 2022 by Sebastian
Assignee
Assign to
Time tracking