Closed naga-re closed 8 months ago
Hello, thanks for reporting the issue, we are on it!
@naga-re did you use Datashare already on the same laptop where you had the error (before 14.0.x)?
@naga-re did you use Datashare already on the same laptop where you had the error (before 14.0.x)?
It's very plausible that a previous version (before the 14.x.x branch) was installed, one day, on this machine, according to the owner of the Mac (I speak on behalf of the person who has this problem and who's not on GitHub)
It looks like there is a conflicts with the previous and new launcher. Something might have gone wrong when uninstalling the previous version.
Could you show us the content of /Applications/Datashare.app/Contents/MacOS/Datashare.command
?
If you can't, I believe uninstalling/installing Datashare should solve your issue. Please note we are about to release a new version (14.1.3) which fix a compatibility problem on Apple Silicon Macs.
Ok.
Here's the content of the file Datashare.command :
#!/bin/bash
# Get the path to the PID file
pid_file="/tmp/datashare.pid"
pid=$(cat $pid_file 2>/dev/null)
# Collect Datashare conviguration env
datashare_version="13.1.2"
datashare_data_path="/Users/${USER}/Datashare"
datashare_index_path="/Users/${USER}/Library/Datashare/index"
datashare_plugins_path="/Users/${USER}/Library/datashare/plugins"
datashare_extensions_path="/Users/${USER}/Library/datashare/extensions"
# Java binary to use to start Datashare
jre_version=11
java_bin="$(/usr/libexec/java_home -F -v $jre_version)/bin/java"
function on_exit_remove_pid_file {
rm -f $pid_file
}
function save_pid {
echo $$ > "$pid_file"
}
function start_datashare {
mkdir -p "${datashare_index_path}" "${datashare_plugins_path}" "${datashare_extensions_path}"
if [[ -z "${DS_JAVA_OPTS}" ]]; then
mem_allocated=$(sysctl -a | grep hw.memsize | awk '{print $2"/(2*1024^2)"}' | bc)
DS_JAVA_OPTS="-Xmx${mem_allocated}m"
fi
cd "/Users/${USER}/Library/Datashare" || exit # needed for /dist
$java_bin \
--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED \
-DPROD_MODE=true \
-Dfile.encoding=UTF-8 \
-Djava.system.class.loader=org.icij.datashare.DynamicClassLoader \
-cp "./dist:/Applications/Datashare.app/Contents/Resources/datashare-dist-${datashare_version}-all.jar" org.icij.datashare.Main \
--dataDir "$datashare_data_path" \
--queueType MEMORY \
--busType MEMORY \
--dataSourceUrl jdbc:sqlite:file:"/Users/${USER}/Library/Datashare/dist/datashare.db" \
--settings ./dist/datashare.conf \
--mode EMBEDDED \
--browserOpenLink true \
--elasticsearchDataPath "$datashare_index_path" \
--pluginsDir "${datashare_plugins_path}" \
--extensionsDir "${datashare_extensions_path}"
}
# Ensure the PID file is removed when the script exits
trap on_exit_remove_pid_file EXIT
# Check if the PID file exists and is already running
if [ -f "$pid_file" ] && kill -0 $pid > /dev/null 2>&1
then
echo "Datashare is already running (PID: $pid)"
else
# If the PID file does not exist, store its PID in the PID file
save_pid
# Finally, start Datashare
start_datashare
fi
I also advised my friend to properly and completely uninstall Datashare and its dependencies before attempting to reinstall the App
And it's noted for the next update. ;)
Thanks !
The launcher is indeed for 13.1.2
which is not compatible with Datashare 14
and higher. Very strange that it did not get overridden by the installer!
I'm closing this issue for now but let us know if the problem is still persists.
Update :
Completely uninstalling the application and its dependencies and reinstalling Datashare worked. ! Thanks again to the person who was affected by this problem.
Describe the bug After installing Datashare on Mac, unable to launch it, errors appear in Terminal.
To Reproduce
Desktop: