JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #21  
Old 19.07.2015, 21:52
0bi-wan 0bi-wan is offline
Baby Loader
 
Join Date: Jul 2015
Posts: 6
Default

Hi,

sudoers ist angepasst, das EventSkript hat einen "illegal character" ausgegeben, wurde aber behoben (die Zeile path = "\\"+path+\\""; hab ich raus geschmissen).

Warum als sudo? Keine Ahnung, da gabs mal irgendwann am Anfang, als ich alles mögliche ausprobiert habe, eine Meldung permission denied o.ä., dann bin ich zum sudo übergegangen (JD läuft selbst aber doch auch grundsätzlich als root oder hab ich was falsch verstanden?)

Jetzt bin ich soweit, dass ich JD aus der shell starten kann, dann funktioniert auch alles, auch ganz automatisch.

Starte ich JD allerdings über die Aufgabenverwaltung der Diskstation klappts nicht mehr. Es kommt eine Abfrage wie hier: https://board.jdownloader.org/showthread.php?t=62935 (EventScriptor permissions required).
Diese kann ich zwar bestätigen und auch den Haken "don't show again" setzen, aber es klappt trotzdem nichts. Logs durchgeguck und folgendes gefunden:

ScriptEnvironment.log:
Code:
------------------------Thread: 1417:ScriptEnvironment.log-----------------------
--ID:1417TS:1437330829335-7/19/15 7:33:49 PM -  [org.appwork.utils.swing.dialog.ConfirmDialog(<init>)] -> Utils>ScriptEnvironment.log>Dialog    [allow][deny]
flag:  1000100000
title: Event Scripter permissions required!
msg:   
The Event Script 'FileBot' requires permissions for the trigger 'Archive extraction finished'.
The script tries to 
Execute a local process. 
Do you want to allow this? If you are not sure, please check your script!
--ID:1417TS:1437330829342-7/19/15 7:33:49 PM -  [org.appwork.utils.swing.dialog.AbstractDialog(forceDummyInit)] -> Utils>ScriptEnvironment.log>Force Dummy Init
--ID:1417TS:1437330829345-7/19/15 7:33:49 PM -  [org.appwork.storage.JsonKeyValueStorage(<init>)] -> Utils>ScriptEnvironment.log>Read Config: /volume1/@appstore/JDownloader/cfg/Dialogs.json
--ID:1417TS:1437330829346-7/19/15 7:33:49 PM -  [org.appwork.utils.swing.dialog.AbstractDialog(resetDummyInit)] -> Utils>ScriptEnvironment.log>Reset Dummy Info
Reply With Quote
  #22  
Old 19.07.2015, 22:03
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 59,753
Default

Also du kannst sudo nehmen ohne PW? Unter welchem Nutzer wird dein JD gestartet wenn du es per Aufgabenverwaltung startest?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #23  
Old 19.07.2015, 22:25
0bi-wan 0bi-wan is offline
Baby Loader
 
Join Date: Jul 2015
Posts: 6
Default

Wird als root gestartet:



S30jdownloader:
Code:
#!/bin/sh
#
# Startup script for JDownloader
#

echo 1 > /root/JD_from_opt_etc_initd
case "$1" in
   'start')
      /volume1/@appstore/JavaManager/Java/bin/java -Djava.awt.headless=true -jar /volume1/@appstore/JDownloader/JDownloader.jar & ;;
   'stop')
      kill $(cat /volume1/@appstore/JDownloader/JDownloader.pid);;
   *)
      echo "usage $0 start|stop" ;;
esac
und ja, ich kann mit allen Benutzern (sind nur sabnzbd, username, admin und root) den sudo Befehl ohne PW-Abfrage ausführen.

Gruß 0bi

EDIT:
Als Übergangslösung habe ich nun vor die Startzeile nohup eingefügt. Jetzt kann ich JD über die shell starten und dann die shell beenden. So läuft es im Moment, zumindest bis JD nicht neu gestartet wird (Update oder reboot).
Ich frage mich nur immer noch, welchen Unterschied der Start über SHH im Vergleich zum Start über die Aufgabenverwaltung macht.

EDIT2:
jetzt funktioniert alles. Es lag daran, dass die die Aufgabenverwaltung Programme zwar als root startet, aber nicht die PATH-Variablen aus /root/.profile verwendet.
Daher hat ein "source /root/.profile" zu Beginn des Skripts die Lösung gebracht.

Last edited by 0bi-wan; 20.07.2015 at 12:24.
Reply With Quote
  #24  
Old 20.07.2015, 12:13
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 59,753
Default

Die Scripte sind ausführbar ? (chmod +x )
Evtl mal in deinem Script den aktuellen Ordner korrekt setzen? (cd /xy)
__________________
JD-Dev & Server-Admin
Reply With Quote
  #25  
Old 20.07.2015, 13:11
0bi-wan 0bi-wan is offline
Baby Loader
 
Join Date: Jul 2015
Posts: 6
Default

Danke nochmal für die schnelle nette Hilfe.

ich war der Meinung, dass ich in allen Skripten absolute Pfade verwendet habe. Anscheinend habe ich an der einen oder anderen Stelle etwas übersehen. Mit dem laden des Profils funktioniert jetzt auf jeden Fall alles wie gewünscht.

Gruß
0bi
Reply With Quote
  #26  
Old 20.07.2015, 13:21
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 59,753
Default

Sprich geht nun alles?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #27  
Old 20.07.2015, 18:19
0bi-wan 0bi-wan is offline
Baby Loader
 
Join Date: Jul 2015
Posts: 6
Default

Ja, alles funktioniert. Bin jetzt noch am Feintuning für das FilebotScript, aber das ist ja kein JD-Problem. Der Eventscripter startet alles wie gewünscht und alles geht wie es soll.

Danke
Reply With Quote
  #28  
Old 20.07.2015, 18:24
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 59,753
Default

Danke fürs Feedback und weiterhin viel Spaß mit der Kombi
__________________
JD-Dev & Server-Admin
Reply With Quote
  #29  
Old 16.11.2015, 23:57
Vippis
Guest
 
Posts: n/a
Default

Hallo,

ich bin glaube ich zu blöd das einzurichten. Ich habe eine Synology DS214play wo JD2 Beta läuft (installiert als SPK). Dann läuft auch noch Java und Filebot auf dem NAS.

Ich konnte den Event Scripter in JD2 aktivieren, wie bekomme ich das Skript hinein das Filebot startet?

Wo finde ich die Logs, die hier gepostet wurden falls etwas bei der Ausführung des Skripts fehlschlägt?

Bitte Erklärung für Noobs bitte

Beste Grüße
Vippis
Reply With Quote
  #30  
Old 17.11.2015, 11:24
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 59,753
Default

Das Script bekommst du über Copy/Paste in die Profieinstellungen des Eventscripters rein.
Die Logs findest du Wahlweise auf der Console oder eben im Logs Ordner.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #31  
Old 26.11.2015, 14:13
Crack00r Crack00r is offline
DSL User
 
Join Date: Nov 2015
Posts: 37
Default

May anyone can help me?

Cant get it working :/


Code:
var command = "C://Program Files//FileBot//filebot.exe"; // Change this if filebot isn't on your path
var logfile = "C:/jdownloader-eventscripter.log"; // File this script logs to. Use forward slashes as path separators!
var filebotLogfile = "C:/filebot.log"; // File that filebot will log to. Use forward slashes as path separators!
var downloadBase = "D:\Downloads"; // Base folder under which your download packages reside. Use escaped backslashes as path separators!
var archiveExtensions = /(\.(zip|rar|7z|par\d+|part\d+|r\d+|t\d+|\d{3}))$/; // Regex to test for nested archives in extracted files

// Parameters for the scripts to run
var params = {
    "rename": {
        "options": {
            "-script": "fn:amc",
            "--log-file": filebotLogfile,
            "--action": "move",
            "--conflict": "auto"
        },
        "defs": {
            "plex": "crack00r",
            "unsorted": "y",
            "skipExtract": "y",
            "clean": "y",
            "minFileSize": "104857600",
            "excludeList": "C:\amc-input.txt",
            "seriesFormat": "D:\Filme\Filme\Serien\{n}/{'Season '+s}/{n} - {s00e00} - {t}",
            "movieFormat": "D:\Filme\Filme\Filme\{n} ({y}) [{vf}]/{n} ({y}) [{vf}]"
        },
        "switches": [
            "-non-strict"
        ]
    },
    "cleaner": {
        "options": {
            "-script": "fn:cleaner",
            "--log-file": filebotLogfile
        },
        "defs": {
            "root": "y"
        },
        "switches": []
    }
}

var logBuf = "";

function log(message) {
    logBuf += new Date().toISOString().slice(0, 19) + " - " + message + "\r\n";
}

function logArray(message, arr) {
    log("\t" + message);

    if (arr == null) {
        log("\t\tnone");
        return;
    }

    for (var i = 0; i < arr.length; i++) {
        log("\t\t" + arr[i]);
    }
}

function logSpacer() {
    log("++++++++++++++++++++++++++++++");
}

function flushLog() {
    // Comment out the next two lines to prevent log from being written to file
    writeFile(logfile, logBuf, true);
    logBuf = "";
}

function quoteIfNecessary(value) {
    return (value != null && value.indexOf("\"") < 0) ? '"' + value + '"' : value;
}

function quoteArrayElements(input) {
    var result = [];

    for (var i = 0; i < input.length; i++) {
        result[result.length] = quoteIfNecessary(input[i]);
    }

    return result;
}

function reduce(map, joinChar) {
    var keyValuePairs = [];

    for (var key in map) {
        keyValuePairs[keyValuePairs.length] = key + joinChar + map[key];
    }

    return keyValuePairs;
}

function mapToArray(map) {
    var array = [];

    for (var key in map) {
        array[array.length] = key;
        array[array.length] = map[key];
    }

    return array;
}

function createArgumentArray(parameters, inputs) {
    var options = mapToArray(parameters["options"]);
    var switches = parameters["switches"];
    var defs = reduce(parameters["defs"], "=");

    return [command].concat(options).concat(switches).concat(inputs).concat(["--def"]).concat(defs);
}

function isArchiveFile(filename) {
    return archiveExtensions.test(filename);
}

function containsNestedArchive(extractedFiles) {
    for (var i = 0; i < extractedFiles.length; i++) {
        if (isArchiveFile(extractedFiles[i])) {
            return true;
        }
    }

    return false;
}

function getPackageRoot(folder) {
    return folder.substring(0, folder.indexOf("\\", downloadBase.length + 1));
}

var archiveFolder = archive.getFolder();
var archiveName = archive.getName();
var archiveType = archive.getArchiveType();
var extractedFiles = archive.getExtractedFiles();
var archiveUID = archiveFolder + "\\" + archiveName;
var packageRoot = getPackageRoot(archiveFolder);

logSpacer();
log("FINISHED EXTRACTION - " + archiveUID);
log("\tType: " + archiveType);
log("\tPackage root: " + packageRoot);
logArray("Extracted files:", extractedFiles);

if (extractedFiles == null || extractedFiles.length == 0) {
    log("SKIPPING - No files extracted.");
} else if (containsNestedArchive(extractedFiles)) {
    log("SKIPPING - Nested archive detected.");
} else {
    var renameInputs = quoteArrayElements(extractedFiles);
    var renameArgs = createArgumentArray(params["rename"], renameInputs);
    log("RUNNING SCRIPT - " + archiveUID);

    callAsync(
        function(exitCode, stdOut, errOut) {
            if (exitCode == 0) {
                log("SUCCESS - " + archiveUID);

                var cleanerArgs = createArgumentArray(params["cleaner"], packageRoot);

                log("CLEANING - " + packageRoot);

                callAsync(
                    function(exitCode, stdOut, errOut) {
                        if (exitCode == 0) {
                            log("ALL CLEAN - " + packageRoot);
                        } else {
                            log("STILL DIRTY - " + packageRoot);
                        }

                        flushLog();
                    },
                    cleanerArgs
                );
            } else {
                log("ERROR - " + archiveUID + " - Code " + exitCode);
            }

            flushLog();
        },
        renameArgs
    );
}

logSpacer();
flushLog();

But I just get
Code:
net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot call method "substring" of null (#129)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3634)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3650)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3664)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2221)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2215)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1333)
	at script.getPackageRoot(:129)
	at script(:137)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:121)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.exec(InterpretedFunction.java:115)
	at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1212)
	at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:196)
	at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:92)
Reply With Quote
  #32  
Old 26.11.2015, 14:24
Crack00r Crack00r is offline
DSL User
 
Join Date: Nov 2015
Posts: 37
Default

Code:
net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped org.jdownloader.extensions.eventscripter.EnvironmentException: net.sourceforge.htmlunit.corejs.javascript.EcmaError: Stacktrace: null (#67)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
	at org.jdownloader.extensions.eventscripter.EnvironmentException.<init>(EnvironmentException.java:10)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:885)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
	at script.flushLog(:67)
	at script(:171)
	at script.flushLog(:67)
	at script(:171)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:121)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:103)
	at org.jdownloader.extensions.eventscripter.ScriptReferenceThread.executeCallback(ScriptReferenceThread.java:21)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment$2.run(ScriptEnvironment.java:202)
 (#67)
	at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1907)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:146)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:121)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:103)
	at org.jdownloader.extensions.eventscripter.ScriptReferenceThread.executeCallback(ScriptReferenceThread.java:21)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment$2.run(ScriptEnvironment.java:202)
Caused by: org.jdownloader.extensions.eventscripter.EnvironmentException: net.sourceforge.htmlunit.corejs.javascript.EcmaError: Stacktrace: null (#67)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
	at org.jdownloader.extensions.eventscripter.EnvironmentException.<init>(EnvironmentException.java:10)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:885)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
	at script.flushLog(:67)
	at script(:171)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:121)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:103)
	at org.jdownloader.extensions.eventscripter.ScriptReferenceThread.executeCallback(ScriptReferenceThread.java:21)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment$2.run(ScriptEnvironment.java:202)

	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:885)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
	... 10 more
Caused by: java.io.IOException: Dem Client fehlt ein erforderliches Recht
	at java.io.WinNTFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(Unknown Source)
	at org.appwork.utils.IO.writeStringToFile(IO.java:617)
	at org.appwork.utils.IO.writeStringToFile(IO.java:606)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:883)
	... 15 more
Reply With Quote
  #33  
Old 26.11.2015, 14:24
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 59,753
Default

function getPackageRoot(folder) {
return folder.substring(0, folder.indexOf("\", downloadBase.length + 1));
}
this causes the issue because folder does not exist(null) and you cannot call null.substring

do you get this error while testing or using the script?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #34  
Old 26.11.2015, 14:26
Crack00r Crack00r is offline
DSL User
 
Join Date: Nov 2015
Posts: 37
Default

Quote:
Originally Posted by Jiaz View Post
function getPackageRoot(folder) {
return folder.substring(0, folder.indexOf("", downloadBase.length + 1));
}
this causes the issue because folder does not exist(null) and you cannot call null.substring

do you get this error while testing or using the script?
I get it on testing
On running it live I get
Code:
net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped org.jdownloader.extensions.eventscripter.EnvironmentException: net.sourceforge.htmlunit.corejs.javascript.EcmaError: Stacktrace: null (#67)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
	at org.jdownloader.extensions.eventscripter.EnvironmentException.<init>(EnvironmentException.java:10)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:885)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
	at script.flushLog(:67)
	at script(:171)
	at script.flushLog(:67)
	at script(:171)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:121)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:103)
	at org.jdownloader.extensions.eventscripter.ScriptReferenceThread.executeCallback(ScriptReferenceThread.java:21)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment$2.run(ScriptEnvironment.java:202)
 (#67)
	at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1907)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:146)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:121)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:103)
	at org.jdownloader.extensions.eventscripter.ScriptReferenceThread.executeCallback(ScriptReferenceThread.java:21)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment$2.run(ScriptEnvironment.java:202)
Caused by: org.jdownloader.extensions.eventscripter.EnvironmentException: net.sourceforge.htmlunit.corejs.javascript.EcmaError: Stacktrace: null (#67)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
	at org.jdownloader.extensions.eventscripter.EnvironmentException.<init>(EnvironmentException.java:10)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:885)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
	at script.flushLog(:67)
	at script(:171)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:121)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:103)
	at org.jdownloader.extensions.eventscripter.ScriptReferenceThread.executeCallback(ScriptReferenceThread.java:21)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment$2.run(ScriptEnvironment.java:202)

	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:885)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
	... 10 more
Caused by: java.io.IOException: Dem Client fehlt ein erforderliches Recht
	at java.io.WinNTFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(Unknown Source)
	at org.appwork.utils.IO.writeStringToFile(IO.java:617)
	at org.appwork.utils.IO.writeStringToFile(IO.java:606)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:883)
	... 15 more
Reply With Quote
  #35  
Old 26.11.2015, 14:32
Crack00r Crack00r is offline
DSL User
 
Join Date: Nov 2015
Posts: 37
Default

Ok, I Check now all folder, but now I get
Code:
net.sourceforge.htmlunit.corejs.javascript.WrappedException: Wrapped org.jdownloader.extensions.eventscripter.EnvironmentException: net.sourceforge.htmlunit.corejs.javascript.EcmaError: Stacktrace: null (#67)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
	at org.jdownloader.extensions.eventscripter.EnvironmentException.<init>(EnvironmentException.java:10)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:885)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
	at script.flushLog(:67)
	at script(:171)
	at script.flushLog(:67)
	at script(:171)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:121)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:103)
	at org.jdownloader.extensions.eventscripter.ScriptReferenceThread.executeCallback(ScriptReferenceThread.java:21)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment$2.run(ScriptEnvironment.java:202)
 (#67)
	at net.sourceforge.htmlunit.corejs.javascript.Context.throwAsScriptRuntimeEx(Context.java:1907)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:146)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:121)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:103)
	at org.jdownloader.extensions.eventscripter.ScriptReferenceThread.executeCallback(ScriptReferenceThread.java:21)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment$2.run(ScriptEnvironment.java:202)
Caused by: org.jdownloader.extensions.eventscripter.EnvironmentException: net.sourceforge.htmlunit.corejs.javascript.EcmaError: Stacktrace: null (#67)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3629)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3613)
	at org.jdownloader.extensions.eventscripter.EnvironmentException.<init>(EnvironmentException.java:10)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:885)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
	at net.sourceforge.htmlunit.corejs.javascript.NativeJavaMethod.call(NativeJavaMethod.java:213)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1531)
	at script.flushLog(:67)
	at script(:171)
	at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:798)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:105)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:411)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory.doTopCall(JSHtmlUnitPermissionRestricter.java:121)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3057)
	at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:103)
	at org.jdownloader.extensions.eventscripter.ScriptReferenceThread.executeCallback(ScriptReferenceThread.java:21)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment$2.run(ScriptEnvironment.java:202)

	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:885)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.sourceforge.htmlunit.corejs.javascript.MemberBox.invoke(MemberBox.java:120)
	... 10 more
Caused by: java.io.IOException: Dem Client fehlt ein erforderliches Recht
	at java.io.WinNTFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(Unknown Source)
	at org.appwork.utils.IO.writeStringToFile(IO.java:617)
	at org.appwork.utils.IO.writeStringToFile(IO.java:606)
	at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment.writeFile(ScriptEnvironment.java:883)
	... 15 more
Reply With Quote
  #36  
Old 26.11.2015, 15:06
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 59,753
Default

Caused by: java.io.IOException: Dem Client fehlt ein erforderliches Recht
at java.io.WinNTFileSystem.createFileExclusively(Native Method)

JDownloader is not allowed to write to that Folder/File


You need to update your script to check for null values and replace by dummy values because they return null in testing (for example getFolder does return null)
__________________
JD-Dev & Server-Admin
Reply With Quote
  #37  
Old 26.11.2015, 15:45
Crack00r Crack00r is offline
DSL User
 
Join Date: Nov 2015
Posts: 37
Default

Ich bekomme es nicht hin (
Liegt das mit den Rechten evtl an Windows 10?
Reply With Quote
  #38  
Old 26.11.2015, 16:10
Crack00r Crack00r is offline
DSL User
 
Join Date: Nov 2015
Posts: 37
Default

Jetzt Bin Ich runter auf eine Fehlermeldung
Code:
net.sourceforge.htmlunit.corejs.javascript.EvaluatorException: unterminated string literal (#4)
	at net.sourceforge.htmlunit.corejs.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:71)
	at net.sourceforge.htmlunit.corejs.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:61)
	at net.sourceforge.htmlunit.corejs.javascript.Parser.addError(Parser.java:187)
	at net.sourceforge.htmlunit.corejs.javascript.Parser.addError(Parser.java:167)
	at net.sourceforge.htmlunit.corejs.javascript.Parser.addError(Parser.java:163)
	at net.sourceforge.htmlunit.corejs.javascript.TokenStream.getToken(TokenStream.java:722)
	at net.sourceforge.htmlunit.corejs.javascript.Parser.peekToken(Parser.java:286)
	at net.sourceforge.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:1994)
	at net.sourceforge.htmlunit.corejs.javascript.Parser.variables(Parser.java:1843)
	at net.sourceforge.htmlunit.corejs.javascript.Parser.statementHelper(Parser.java:974)
	at net.sourceforge.htmlunit.corejs.javascript.Parser.statement(Parser.java:891)
	at net.sourceforge.htmlunit.corejs.javascript.Parser.parse(Parser.java:535)
	at net.sourceforge.htmlunit.corejs.javascript.Parser.parse(Parser.java:456)
	at net.sourceforge.htmlunit.corejs.javascript.Context.compileImpl(Context.java:2514)
	at net.sourceforge.htmlunit.corejs.javascript.Context.compileString(Context.java:1474)
	at org.jdownloader.scripting.JSHtmlUnitPermissionRestricter$SandboxContextFactory$1.compileString(JSHtmlUnitPermissionRestricter.java:137)
	at net.sourceforge.htmlunit.corejs.javascript.Context.compileString(Context.java:1466)
	at net.sourceforge.htmlunit.corejs.javascript.Context.evaluateString(Context.java:1209)
	at org.jdownloader.extensions.eventscripter.ScriptThread.evalUNtrusted(ScriptThread.java:196)
	at org.jdownloader.extensions.eventscripter.ScriptThread.run(ScriptThread.java:92)
Reply With Quote
  #39  
Old 26.11.2015, 17:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 59,753
Default

unterminated string literal (#4)
Syntax Fehler im Script
__________________
JD-Dev & Server-Admin
Reply With Quote
  #40  
Old 30.11.2015, 08:11
Crack00r Crack00r is offline
DSL User
 
Join Date: Nov 2015
Posts: 37
Default

Ok, soweit hab ich jetzt alles am laufen.

Das einzige Problem das ich Jetzt noch habe, in Filebot hab ich deutsch eingestellt, trotzdem nennt er die Filme und Serien immer Englisch...

:&
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 07:16.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.