Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with SQlite (only on windows ?) with 1.15.0 #174

Open
manne65-hd opened this issue Oct 15, 2023 · 11 comments
Open

Problem with SQlite (only on windows ?) with 1.15.0 #174

manne65-hd opened this issue Oct 15, 2023 · 11 comments

Comments

@manne65-hd
Copy link

Hi there at MailSlurper,
let me start by letting you know how awesome I find this little tool!

I have been using XAMPPs mailtodisk.exe for a long time while testing my software, and I just recently ran across MailSlurper!
This software makes my local and staging-environments much easier to handle :-)

I am facing an issue using the latest release (1.15.0) on my Windows 10pro-machine.

When starting the mailslurper.exe I get a couple of info-Debug-Messages and then this final FATAL message:

level=fatal msg="Error connecting to storage type '1' with a connection string of ./mailslurper.db" error="Error executing query: \n\t\tCREATE TABLE mailitem (\n\t\t\tid TEXT PRIMARY KEY,\n\t\t\tdateSent TEXT,\n\t\t\tfromAddress TEXT,\n\t\t\ttoAddressList TEXT,\n\t\t\tsubject TEXT,\n\t\t\txmailer TEXT,\n\t\t\tbody TEXT,\n\t\t\tcontentType TEXT,\n\t\t\tboundary TEXT\n\t\t);: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub" who=MailSlurper

I guess, that "Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work." is the vital part of the error-message, because it sounds like none of the CREATE TABLE commands are "known", because a required library for SQLite is missing ?!

I have tested with versions 1.13.2, 1.14.0 and 1.14.1 ... which all work on my machine!

Looking forward to your answers,
Manfred

@manne65-hd manne65-hd changed the title Problem with SQlite (on windows ?) with 1.15.0 Problem with SQlite (only on windows ?) with 1.15.0 Oct 15, 2023
@adampresley
Copy link
Contributor

I'll have to take a look. Thanks for the ticket.

@hertg
Copy link

hertg commented Oct 19, 2023

I am facing an issue using the latest release (1.15.0) on my Windows 10pro-machine.

I get the same error for 1.15.0 on Linux, using the pre-compiled version from the Github Release assets.

@johnli2210
Copy link

Same issue on mac os 1.15.0

@bermudi
Copy link

bermudi commented Nov 18, 2023

I get the same error for 1.15.0 on Linux, using the pre-compiled version from the Github Release assets.

+1

@albertohirota
Copy link

Same error on Windows 11 - 1.15

@hazg
Copy link

hazg commented Dec 8, 2023

same on ubuntu 23.10

@andrewgbell
Copy link

andrewgbell commented Jan 25, 2024

I'm finding the same with 1.15.0 on windows 2022, and ubuntu 22.04.
1.14 is fine.

@pepinho
Copy link

pepinho commented Feb 12, 2024

same.
1.15.0 on windows.
first log on startup states:
time="2024-02-12T09:55:19+01:00" level=info msg="Starting MailSlurper Server v1.14.1" who=MailSlurper

notice the v1.14.1 output?
is this a packaging error in the 1.15 ZIP?

@slaveofcode
Copy link

Same issue on mac.

INFO[0000] Starting MailSlurper Server v1.14.1           who=MailSlurper
INFO[0000] Using configuration from config.json          who=MailSlurper
INFO[0000] Connecting to database                        who=MailSlurper
INFO[0000] Creating database tables...                   who=MailSlurper
FATA[0000] Error connecting to storage type '1' with a connection string of ./mailslurper.db  error="Error executing query: \n\t\tCREATE TABLE mailitem (\n\t\t\tid TEXT PRIMARY KEY,\n\t\t\tdateSent TEXT,\n\t\t\tfromAddress TEXT,\n\t\t\ttoAddressList TEXT,\n\t\t\tsubject TEXT,\n\t\t\txmailer TEXT,\n\t\t\tbody TEXT,\n\t\t\tcontentType TEXT,\n\t\t\tboundary TEXT\n\t\t);: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub" who=MailSlurper

@andrewgbell
Copy link

andrewgbell commented Mar 11, 2024

I had to clone from source to get it work.

git clone https://github.com/mailslurper/mailslurper.git
cd mailslurper/cmd/mailslurper
go get github.com/mjibson/esc
go get
go build

@MarianMacik
Copy link

It seems the 1.15.0 release wasn't built using CGO_ENABLED=1.

@adampresley Can you create a fix release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests