Debug error > "No call stack available (Internal error: TypeError: Cannot read property '0' of undefined)."

VSCode Version: Version 1.2.1 (1.2.1)
OS Version: OS X El Capitan Version 10.11.4

Steps to Reproduce:

Add a breakpoint
Launch debug; it sometimes break 'somewhere' yet I don't have the control and the only message I receive is "No call stack available (Internal error: TypeError: Cannot read property '0' of undefined)."
See screenshot attached.

Sometimes it works, some other it does, on the same code

I have having the same exact issue.

OS Version: OS X El Capitan Version 10.11.5
VSCode Version: Version 1.2.0 (1.2.0)

+1

+1

+1

What version of node are you using?

It is 5.10.0, while vscode version is 1.2.1.

Since I'm not sure where this comes from (and I cannot reproduce it myself), I've added additional information to the error message and added some additional checks in the injected code. This will be in the June release (and tomorrow's Insider).

I’m at v6.2.0
De : Andre Weinand<EMAIL_ADDRESS>Répondre à : Microsoft/vscode<EMAIL_ADDRESS>Date : jeudi 30 juin 2016 21:19
À : Microsoft/vscode<EMAIL_ADDRESS>Cc : Boris Gbahoué<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Objet : Re: [Microsoft/vscode] Debug error > "No call stack available (Internal error: TypeError: Cannot read property '0' of undefined)." (#7683)
Since I'm not sure where this comes from (and I cannot reproduce it myself), I've added additional information to the error message and added some additional checks in the injected code. This will be in the June release (and tomorrow's Insider).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I'm using VSCode v. 1.4.0-insider (updated right now) on Windows 10  and I have the same problem (tested with node 6.2.2 and node 6.3).
Error message: 'No call stack available ({_command}: Internal error: TypeError: Cannot read property '0' of undefined).
The error is very common, and is almost impossible debug anything :(

@sarvaje does the problem occur in VS Code 1.3 too?

yes, the problem is happening for a long time.
Maybe is not related, but I notice that the problem ocurror more ofen when I try to debug promises (using bluebird for example)

+1 Have that problem for the first time debugging a command line node app with Q based promises. OS/X current, Node 6.2.2

Since I could not reproduce this problem, I've instrumented node-debug so that we can get additional information when the problem occurs.
In the July release (and next Monday's insider release) VS Code should show an almost complete call stack even is this problem occurs.

Only stackframes that run into the problem will show the error.
If you are affected by this problem please add the following property to your launch configuration:
"trace": "7683"
If the problem occurs again, a stacktrace will appear on the debug console.
Please add this information here so that I can investigate.

@weinand : depends what is considered "small" :-)
I have a small program that extracts the "url" value from har files (the JSON you get when you record a browser session. I'm sure you can find some of those. The project is a single js file.
package.json
  {
    "name": "harparser",
    "version": "0.0.1",
    "description": "Parse har files to get specific information out",
    "main": "app.js",
    "scripts": {
      "test": "echo \"Error: no test specified\" && exit 1"
    },
    "keywords": [
      "har",
      "browser",
      "api"
    ],
    "author": "Stephan H. Wissel",
    "dependencies": {
      "lodash": "^4.13.1",
      "q": "^1.4.1",
      "querystring": "^0.2.0",
      "stream-json": "^0.4.2",
      "url": "^0.11.0"
    }
  }

app.js
        'use strict';

        var sourceDir = '../rawHAR/';
        var Combo = require('stream-json/Combo');
        var Emitter = require('stream-json/Emitter');
        var _ = require('lodash');
        var Q = require('q');
        var url = require('url');
        var querystring = require('querystring');

        var options = {
            packKeys: true,
            packStrings: true,
            packNumbers: true
        };

        var fs = require('fs');
        var objectCounter = 0;

        var getCount = 0;
        var postCount = 0;
        var urlCollection = [];
        var parameterCollection = [];
        var doneCounter = 0;

        console.log('Start App2');

        var processingArray = [];

        fs.readdir(sourceDir, function (err, data) {
            data.forEach(function (element, counter, reference) {
                var last = (counter === reference.length - 1);
                console.log('Processing ' + sourceDir + element + (last ? ' (the last)' : ''));
                if (element.indexOf('.har') > 0) {
                    // Add one to the list to be processes
                    doneCounter++;
                    processingArray.push(processOneFile(sourceDir + element));
                }
            });

            console.log('Files are away, results coming in...');

            Q.allSettled(processingArray).then(function (results) {
                var alltheURLs = _.uniq(urlCollection);
                var allTheParams = _.uniq(parameterCollection);
                console.log('Found ', objectCounter, ' objects.');
                console.log('API URLs with GET:' + getCount);
                console.log('API URLs with POST:' + postCount);
                console.log('Unique URLs: ' + alltheURLs.length);
                console.log('Unique params: ' + allTheParams.length);
                console.log(JSON.stringify(alltheURLs));
                console.log(JSON.stringify(allTheParams));
                // TODO write URLs into file
            });
        });

        //processOneFile(sourceFile);

        function processOneFile(fName) {
            var deferred = Q.defer();
            var combo = new Combo(options);
            var emitter = new Emitter();
            var method = 'unknown';
            var attention = false;
            var methodComing = false;

            var pipeline = fs.createReadStream(fName).pipe(combo).pipe(emitter);

            combo.on('data', function (chunk) {
                ++objectCounter;
            });
            pipeline.on('keyValue', function (key) {
                methodComing = (key === 'method');

                attention = (key === 'url');
            });
            pipeline.on('stringValue', function (stringValue) {
                if (methodComing) {
                    method = stringValue;
                }
                if (attention) {
                    if (method == 'GET') {
                        getCount++;
                    }
                    if (method == 'POST') {
                        postCount++;
                    }
                    // Capture the URL
                    updateURLCollection(stringValue);

                }
                attention = false;

            });
            pipeline.on('finish', function () {
                doneCounter--;
                console.log('Finished ' + fName + ' (' + doneCounter + ')');
                deferred.resolve(fName);
            });

            return deferred.promise;
        }

        // Rip the queries apart
        function updateURLCollection(rawURL) {
            var sourceURL = url.parse(rawURL);
            // Capture the base URL
            urlCollection.push(sourceURL.host + sourceURL.pathname);
            // now process the parameters
            var rawQuery = sourceURL.query;
            if (rawQuery) {
                var query = querystring.parse(rawQuery);
                for (var param in query) {
                    parameterCollection.push(param);
                }
            }
        }

That one shows the error. To test it, you need some har files in the ../rawHAR/ directory.

@Stwissel thanks a lot for the code.
Here is what I did to try to reproduce the issue:

with your files I've created project with VS Code 1.3.1, node 6.2.2 on OS X 10.11.5
ran npm install
created 120 *.har files, each about 2.5 MB
set breakpoints in the three pipeline.on callbacks (lines: 73, 78, 96)
started debugging and stepped through the code by keeping either F5, F10, or F11 continuously pressed.
did this about 10 times without running into the issue.

Did you do anything differently when you saw the problem?

On VS Code 1.3.1 I have this problem only when trying to debug mocha tests with the following launch configuration
{           "name": "Run mocha",           "type": "node",           "request": "launch",           "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",           "stopOnEntry": true,           "args": [ "--no-timeouts", "--colors",  "test/**/*.test.js"],           "cwd": "${workspaceRoot}",           "runtimeExecutable": null,           "env": { "NODE_ENV": "testing"}   },
It stops on entry but on following breakpoints I get the problem mentioned above.
Debugging node running regularly produces no errors.

I wish I could give you guys something more concrete to deal with, but I've found that this issue most often crops up with long running processes. I have a webserver which runs for a long time in vscode. In the first few minutes, I can almost always consistently break on a breakpoint.
After 10-20 minutes of runtime, more often than not, I run into this issue when trying to debug.

I have this issue when having a wildcard in the tests. e.g., I have 4 files:
→ l test/integration/
accounts.js     index.js        transactions.js users.js

The launch configuration that causes this error is
{
            // Name of configuration; appears in the launch configuration drop down menu.
            "name": "Run mocha",
            // Type of configuration. Possible values: "node", "mono".
            "type": "node",
            "request": "launch",
            // Workspace relative or absolute path to the program.
            "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
            // Automatically stop program after launch.
            "stopOnEntry": false,
            // Command line arguments passed to the program.
            "args": [
                "test/integration/*.js"
            ],
            "runtimeArgs": [
                //    "--nolazy"
            ],
            // Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
            "cwd": "${workspaceRoot}",
            // Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
            "runtimeExecutable": null,
            // Environment variables passed to the program.
            "env": {
                "NODE_ENV": "test"
            },
            "sourceMaps": true,
            "outDir": "${workspaceRoot}/dist"
        }

But when replacing the wildcard w/
"test/integration/index.js",
"test/integration/users.js",
"test/integration/accounts.js",
"test/integration/transactions.js"

everything works fine. Hope that helps in nailing it down.

FWIW, I'm getting almost the same error exept that it says vscode_backtrace: Internal Error, instead of just Internal Error.
My versions are:
OSX El Capitan 10.11.5
VS Code 1.4.0 6276dcb0ae497766056b4c09ea75be1d76a8b679
Node 6.2.2

@juancampa in what situations are you seeing his error? Can you share the project where you experience the problem?

This bug is pretty bad and breaks debugging in a high percentage of cases for me. I can reproduce it consistently; let me know if there's any way I can help you guys track it down.

@johnfn it would be great if you could share some code and a project setup where you experience the problem. If we can reproduce the problem, we can investigate and probably fix.
But so far we could not reproduce...

Ahh, that's unfortunate. It's my workplace code, so I can't really share it, and it's rather large (100k loc).
Is there any other assistance I could give?
My guess is it probably has something to do with deep callstacks, or generators & promises (which we use a lot of).

@johnfn use of promises seems to be a common pattern of this issue. What kind of promises are you using?

Hi @weinand yes it happens while using co with generator functions. Now it happens every time I debug generator code blocks.

@icezohu what is "co" ?

It's an npm module which could help make the generator code blocks elegant.
https://github.com/tj/co
@weinand

Lots of Bluebird.coroutine, which transforms generators into a sort of async/await pattern. Bluebird is a Promise library for js.

'no call stack available' appeared again this morning in release:
Version 1.5.0-insider (1.5.0-insider)
5fb5131a7d8ab0245af3653fca77f31d7d81d735
2016-09-02T15:32:08.421Z
heavy async context and a breakpoint on gives the 'no call stack available' error, breakpoint off it continues without the 'no call stack available' .

Oh, oh, I have an easily reproducible testcase. At least on my setup (macOS Sierra beta, VSC 1.5.2).
1. Clone https://github.com/Zarel/flodoc
2. Checkout 3d6332eea4
3. Set launch.json to
{
    "version": "0.2.0",
    "configurations": [
		{
			"name": "Run mocha",
			"type": "node",
			"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
			"stopOnEntry": false,
			"args": ["test/spec/*"],
			"cwd": "${workspaceRoot}",
			"runtimeExecutable": null,
			"env": { "NODE_ENV": "development"}
		}
    ]
}

4. Set a breakpoint on line 73 of src/converter.js
5. Debug "Run mocha"
6. Mash "Continue" a few times
7.

+1 with the problem.
OSX 10.11.6
Visual Studo Code - Version 1.5.3 (1.5.3)
In my case it seems related to bluebird Promise. I removed bluebird from the file I was debugging, using the standard ES6 Promise instead, the error stopped and I was able to debug it.

I've run into it without using Bluebird, but it's significantly more rare.

I can also confirm this issue is happening inside a generator function using bluebird's co

If you can use node >= v6.3 then please try our new experimental debugger by setting the type attribute in your launch config to "node2". That should solve the issue.

Adding "trace": "7683" to the launch config did not change anything for me and I still got the same error. Using node2 seems to have fixed it! 👍

@ssynix glad to hear that node2 has fixed this for you.
setting 'trace' to the number of this issue does not make sense ;-)
A better value is "all".

@weinand I was following your suggestion from earlier on this thread. VSCode 1.6.1 complains about it: Property trace is not allowed.
Either way, thanks for the suggestion!

@ssynix oops, I see. Sorry about the bogus trace value from above. I've fixed my comment.

Thank you! @weinand
This was the most annoying issue ever.

I still habe this issue with an attached debugging session. With "type":"node2" it won't attach and "trace": "all" does nothing. VSCode 1.7.2, macOS Sierra 10.12.1

@weinand "node2" is not attaching (not used trace)
Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: Parse Error).
I'm running a jasmine testsuite  inside a docker. Breakpoints in the specs work, but not in the application code (other thread), but I think it's more related to the massiv usage of promises.

@cmdrsabre make sure that node is launched with the new "--inspect" flag. If it is not, node2 will not be able to attach to it successfully and will timeout with the error you are seeing.

@weinand finally this worked. "node2" worked. Thanks a lot

Same issue here with last vscode version.
Trying with node2 and get the following Unhandled error in debug adapter message :
******** Unhandled error in debug adapter - Unhandled promise rejection: TypeError: Column must be greater than or equal to 0, got -1
    at SourceMapConsumer_findMapping [as _findMapping] (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2/node_modules/source-map/lib/source-map-consumer.js:543:13)
    at SourceMapConsumer_generatedPositionFor [as generatedPositionFor] (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2/node_modules/source-map/lib/source-map-consumer.js:748:22)
    at SourceMap.generatedPositionFor (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2/node_modules/vscode-chrome-debug-core/out/src/sourceMaps/sourceMap.js:159:34)
    at SourceMaps.mapToGenerated (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2/node_modules/vscode-chrome-debug-core/out/src/sourceMaps/sourceMaps.js:28:18)
    at args.breakpoints.forEach.bp (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2/node_modules/vscode-chrome-debug-core/out/src/transformers/baseSourceMapTransformer.js:63:53)
    at Array.forEach (native)
    at EagerSourceMapTransformer.setBreakpoints (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/ms-vscode.node-debug2/node_modules/vscode-chrome-debug-core/out/src/transformers/baseSourceMapTransformer.js:61:34)
    at validateBreakpointsPat[...]

What's this?

@rdewolff Can you open a new issue for that? That's a new issue and I'd like to look into it when I have time.

Also it would be very helpful if you run with "diagnosticLogging": true, then include the full log file from the path printed at the top of the console.

Any updates on this?
I am using runInContext from the VM module.
node2 plugin uses node-inspector, which cant debug code running under vm module at all, so I must use the regular node debugger in vscode. In my workspace its crashing all the time (runInContext and BlueBird project). What can I do?
Thanks

Just updated vstudio and ran into this problem
Version 1.9.0
Commit 27240e71ef390bf2d66307e677c2a333cebf75af
Date 2017-02-02T08:31:00.827Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

If you can use node >= v6.3 then please try our new experimental debugger by setting the type attribute in your launch config to "node2". That should solve the issue.

was running into this with node 6.9.5 and  vscode Version 1.9.1 (1.9.1)
changed launch config to node2 works

I am also experiencing this error.
VSCode 1.10.1
Mac OSX 10.11.6
node v7.6.0
electron v1.6.1
I am not able to use "node2"; the debugger will not attach, even though electron is being called with --inspect. This issue suggests that "node2" simply will not work with electron.
I've noticed that every time I restart my computer, the debugger will hit the breakpoint normally (ie returning a valid callstack and variable information) once and only once. After that, it reverts to the error state and nothing I can do seems to fix it.
It seems like some cached file is in an invalid state. Does vscode have some cache I can clear?

Same with VSCode 1.10.1.
In my situation it looks like this:

I set 3 breakpoints and start new debug session. Debugger correctly stops on all three breakpoints.
I repeat previous action in the same debug session. Debugger stops on first and second breakpoint. But for third breakpoint it stops on unknown location and I get error "No call stack available (Internal error: TypeError: Cannot read property '0' of undefined)."
if I restart debug session it works again for the first time, but not for second, third etc..

The situation is the same for legacy and inspector protocol.
For me breakpoints are practically unusable, because after getting error for the first time, they become totally unreliable.

I'm hitting the same thing on 1.10.2, can we re-open this issue?

Sounds like the new 'inspector protocol' debug adapter fixed this for everyone. I recommend using "protocol": "inspector", if you are using Node v6.9+

@chiangf alternatively you could try "protocol": "legacy" with the Insiders build (1.11.0). We've fixed an issue in March that might have solved this issue as well.

I'm having the same issue as @bgradin with electron.  Unfortunately you cannot use node2 with electron so I have to downgrade electron to 1.5.x to get it to work.  Not sure if this is related to electron or vscode.

@brtthomp have you tried to use the Insiders release?

@weinand That seems to have fixed the issue even with electron 1.6.x+.  I didn't read the comments well enough to realize the Insiders build had a potential fix in it.  Thanks!

@brtthomp thanks for trying again.
The March stable release will appear soon...

still happening as of now
VSCode: Version 1.11.2 (1.11.2)
Node: Version v7.7.2

@jlira2 please add "protocol":"inspector" to your launch config. This should make the problem disappear.

Just ran into the same problem, however in my case it was some issue within node module<EMAIL_ADDRESS>that caused the issue. Downgrading lodash has solved the issue for me.


Fixed Issue#17

Fixed #17
_initWithId(id: Int) returns data, with some offset
This commit should fix the issue, whereby an object when initiated with CamembertModel(id: ) constructor returns data with some offset.

:+1:


Wipe the key cache on logout

r? @aalness

If you're going to change this to handle all caches, an easier way to do it would just be to call config.ResetCaches() on the loggedout notification.

LGTM

@strib: like so?

Yep!  Looks good to me.


refresh globalmailcomposer

See https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues/559
If I add an email while the app is running and then try to send an email with shareViaEmail, the app crashes unless I call cycleTheGlobalMailComposer

Looks good to me, thanks a lot!
Closes #559.


neovim/init: set basic options via vim.options

Less DAGs, more customizability.
Moves interpolated basic vim options into vim.options with a backwards compatible interface. I'm fully intending to deprecate all of the options before merge.

Sanity Checking

[ ] I have updated the changelog as per my changes.
[x] I have tested, and self-reviewed my code.
Style and consistency

[x] I ran Alejandra to format my code (nix fmt).
[x] My code conforms to the editorconfig configuration of the project.
[x] My changes are consistent with the rest of the codebase.

If new changes are particularly complex:

[x] My code includes comments in particularly complex areas
[ ] I have added a section in the manual.
[ ] (For breaking changes) I have included a migration guide.

Package(s) built:

[x] .#nix (default package)
[ ] .#maximal
[x] .#docs-html

Tested on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

Add a :+1: reaction to pull requests you find important.

It is not entirely a breaking change since the side effects have been remedied. All renamed options have an equivalent in the new format, except for shift/tab width.
I'll add an entry for those.

This definitely is a breaking changes, since the renamed options will break the user's configuration if they used to override any of them.

Moved the notes to the breaking changes section.


[tabs] No implementation found for action: deleteValue

Hi @oSethoum,
We currently didn't implement a way to delete a tab, I'll remove that action/transition.
You might have to implement this using some local state and mapping through the state values to render the tabs. At best, we can consider adjusting the selected value automatically when a tab is removed from the DOM. However, that's a feature, not a bug.
The original intent behind that transition was "CLEAR_VALUE" not "deleteValue". I'll update it as needed.


Add activeprobe support(draft)

Using the echkenluo/ofnet library which contains ofctrl patch work.
@cl1111 @KeyongSun
controller framework in the echkenluo/everoute:telemetry-draft branch

deprecated draft pr


Fix broken blogpost link

#19 Links referring to documentation in the blogposts are broken. Please update this issue with any new broken links.

Motivation URL
Release Announcement

If the content has not been deleted, please update the link.

Created a pull request with a fix for the above broken URLs.

Thanks!


robot command not found if installing robotframework with pip --user flag

Version information
robotframework 3.0
Python 2.7.12
Xubuntu 16.04
pip 8.1.2

Steps to reproduce the problem
Make sure robotframework is not installed
install it with pip install robotframework --user
run robot --version

Possible error message and traceback.
/usr/bin/robot: No such file or directory
bash: robot: command not found...

I'm fairly certain this is an issue with PATH. Where does pip --user install scripts? It definitely cannot install them to the system wide /usr/bin.

It goes to $HOME/.local/bin

Do you have that in PATH?

Yep, ~/.local/bin is in PATH

Is it before /usr/bin? Does running ~/.local/bin/robot work?

~/.local/bin is after /usr/local/bin
I removed robotframework, the soft link, installed it with --user again, closed all terminal windows, and I cannot reproduce it again. I can try it in another machine.

If you have ~/.local/bin in PATH after system directories where you have robot installed, the system will naturally pick the one in a system directory. I think operating systems sometimes even cache script locations somehow, which means that the script later in PATH is not found even if you remove the script that's there first. This happens on my Linux Mint when I simply delete robot script:
peke@kone ~ $ robot --version
Robot Framework 3.0 (Python 3.4.3 on linux)
peke@kone ~ $ sudo rm /usr/local/bin/robot
[sudo] password for peke:
peke@kone ~ $ robot --version
bash: /usr/local/bin/robot: Tiedostoa tai hakemistoa ei ole

That Tiedostoa tai hakemistoa ei ole is File or directory does not exist in Finnish. =)

Are you suggesting it is a caching issue? Let me verify it on my Xubuntu machine, robot wasn't available there a few days for sure, after it was installed with --user.
Also I will verify if soft links are created or not.

Finally looked in Xubuntu laptop, ~/.local/bin/ simply was not in PATH. I think it is a pip issue.


Logical Type for timezone-naive timestamps

In many systems there is a difference between a timezone-naive timestamp column (called DATETIME in BigQuery, 'logicalType': 'datetime' in Avro) and a timezone-aware timestamp (called TIMESTAMP in BigQuery and always stored in UTC). It seems from [this discussion|https://github.com/apache/parquet-format/pull/51#discussion_r119911623] and the [list of logical types|https://github.com/apache/parquet-format/blob/master/LogicalTypes.md] that parquet only has the timezone-aware version, as all timestamps are stored according to UTC.
Reporter: Tim Swast`
Note: This issue was originally created as PARQUET-1545. Please see the migration documentation for further details.

Nándor Kollár / @nandorKollar:
Great, closing this Jira as done then. By the way, like I told, if you're using parquet-mr, then this is only supported since 1.11.0.

Tim Swast / @tswast:
Thanks @nandorKollar. I see now in the logical types specification that the isAdjustedToUTC parameter is even documented.
This issue can be closed. I'll dig deeper to see why this isn't being set when I convert from pandas DataFrame -> Arrow -> Parquet in the Python code I'm using.

Nándor Kollár / @nandorKollar:
[~swast] actually Parquet already supports both timezone-naive and timezone-aware timestamps too. The logical type API is improved in 1.11.0 (based on the recent improvement in parquet-format), and the timestamp logical type introduced an additional isAdjustedToUTC parameter, which tells what is the semantic of the given timestamp field: false means timezone-naive, and true means timezone-aware timestamp.


reduce initial value is not recycled

The initial value you provide is mutated and reused for each computation. It needs to be a fresh copy. @Turbo87 suggested to turn it into a factory function you supply that gives a fresh value every calculation.

👍 on this issue. The current behavior makes reduce basically unusable.


OkHttp StethoInterceptor fails with "unexpected end of stream" when uploading "multipart" data

Fails only on POST requests with "multipart/form-data" type.
Stacktrace:
retrofit.RetrofitError: unexpected end of stream
            at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:395)
            at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
            at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265)
            at retrofit.RxSupport$2.run(RxSupport.java:55)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at retrofit.Platform$Android$2$1.run(Platform.java:142)
            at java.lang.Thread.run(Thread.java:818)
     Caused by: java.net.ProtocolException: unexpected end of stream
            at com.squareup.okhttp.internal.http.HttpConnection$FixedLengthSink.close(HttpConnection.java:314)
            at okio.RealBufferedSink.close(RealBufferedSink.java:241)
            at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:899)
            at com.facebook.stetho.okhttp.StethoInterceptor.intercept(StethoInterceptor.java:58)
            at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:879)
            at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:760)
            at com.squareup.okhttp.Call.getResponse(Call.java:274)
            at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:230)
            at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:227)
            at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201)
            at com.squareup.okhttp.Call.execute(Call.java:81)
            at retrofit.client.OkClient.execute(OkClient.java:53)
            at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326)
            at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
            at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265)
            at retrofit.RxSupport$2.run(RxSupport.java:55)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at retrofit.Platform$Android$2$1.run(Platform.java:142)
            at java.lang.Thread.run(Thread.java:818)

Similar issue can be found in okhttp: https://github.com/square/okhttp/issues/1587 with problem and solution described.
As I see generateBody method contains error:
    private byte[] generateBody() throws IOException {
      RequestBody body = mRequest.body();
      if (body == null) {
        return null;
      }
      Buffer buffer = new Buffer();
      body.writeTo(buffer);
      return buffer.readByteArray();
    }

I'm not sure that issue applies here directly because we're not actually replacing the request body at all, we're just reading it.  In this case, it actually looks like Stetho's merely in the call stack of another, unrelated issue that is surfaced by the request body declared content length and actual length not matching.
You should take a look at what your request body's contentLength() method returns.  If it is not -1 (as it is by default) then I suspect that's your problem.  If it is -1, then I'm curious what specific version of okhttp you are using because the code I have for okhttp 2.2.0 indicates clearly that only a positive contentLength() could cause this issue.

If it really is somehow a Stetho specific issue, you can try commenting out our generateBody() method so that it doesn't read the body and see if it fixes it.  If it does, then I think we have found an okhttp bug, not a Stetho one :)

@jasta Thank you. I'll check the things you mentioned and write results here. Maybe it is 'okhttp' bug but issue I pointed out tells it is improper use.

Actually the issue you posted is referring to a different scenario that is
fixed by calling flush.  Our scenario is different and should be correct
usage.  In particular, they wrote to a forearding sink without calling
flush causing the final destination sink to be missing data.  In our case,
we don't forward but instead write to and read from our own direct buffer.
No flushing required and no impact on the original request body.

Closing for now as I'm pretty certain the issue isn't within Stetho.  Re-open if you think I'm wrong :)

@jasta thank you anyway :)


Request for Renaming this Repo to Plausible CE

Please do not submit issues here. Best place for self-hosting issues, questions and ideas is the community forum here on GitHub. Thanks!
Repository name community-edition is not stand Alone. I need to perform mkdir plausible before cloning this

@surapuramakhil 👋

Repository name community-edition is not stand Alone.

What do you mean by this exactly?

if i clone this repository my folder name is community-edition. if i come back to this a year later. I need to check folder contents to know what it is

if i clone this repository my folder name is community-edition. if i come back to this a year later - only see name community edition but id doesn't say much. I need to check folder contents to know what it is

Just use git clone git@github.com:plausible/community-edition.git plausible-ce, no?

@ruslandoga
Creating a directory and cloning into it is a one time operation. Is this really that bad? :)

I don't this you got my point. if repo name is stand alone then I don't need to this. I agree its onetime task. too small task. There are plenty of "Easy ways" to get this.
this is just my suggestion / feedback / contribution.
but


AT+BLECONN? returns untrue data

Answers checklist.

[X] I have read the documentation ESP-AT Programming Guide and the issue is not addressed there.
[X] I have used the latest released firmware or have updated my ESP-AT branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report
My device is configured as a BLE client.
The scenario is as follows:
I have one or more connected devices, let's say only one. Then I try to connect to another one, and during that process, during the AT+BLECONN=<conn_index>,<remote_address>[,<addr_type>,<timeout>]  command (its duration) if my already connected device gets disconnected, ESP will not pick it up, there will be no +BLEDISCONN message, nor will the AT+BLECONN? return true data (it will still return now disconnected device as connected).
P.S. My device is ESP32-C3_MINI-1, in case that is relevant and I am using the latest ESP-AT version:
AT+GMR output:
AT version:<IP_ADDRESS>(ec2dec2 - ESP32C3 - Jul 28 2023 07:04:22)

SDK version:v5.0.2-376-g24b9d38a24

compile time(ed0e6d2c):Nov 13 2023 14:28:11

Bin version:v<IP_ADDRESS>(MINI-1)

@Luxin812 please check

@fahirad thank you very much for asking this issue. I've reproduced it locally and will have a fix soon.

This issue should be fixed in v<IP_ADDRESS>. Please verify in v<IP_ADDRESS> version. Thanks.

Hi @Luxin812 ,
I have tested this fix and it works now. Thanks a lot!


configuring handlebars for production

I am trying to achieve following:

My site doesn't require react for landing pages such as home page, about, FAQs etc. So there are some routes such as /about, /faqs etc. where I need to render/serve these pages from express via handlebars with some vanilla JS/CSS.
However, there are some routes in the site that warrants heavy FE work such as React.

Here is the repo where I have the sample code I am testing out with https://github.com/mnkcoder/vite-express-project
In dev mode everything is working as expected with HMR and landing page routes. But I am running into below issues while running in production mode:
Issue 1:
src/server/views/partials/commonScripts.html in dev mode is this
{{#if isDevelopment}}

{{/if}}

when I run npm run build the above is translated to below

<link rel="modulepreload" crossorigin href="/assets/modulepreload-polyfill-3cfb730f.js">
{{#if isDevelopment}}

{{/if}}

the issue here is the generated html has script and link tags outside the handlebars's  {{#if isDevelopment}} conditional flag
Issue 2:
src/server/views/home.html in dev mode is this

after npm run build the above is translated to below

<link rel="modulepreload" crossorigin href="/assets/client-99d9e3e1.js">
<link rel="stylesheet" href="/assets/client-e3a8f781.css">

The issue here is that its injecting script tag after the root div element.
Any suggestions here would be super helpful. Let me know if I need to provide any additional information.

Hi @mnkcoder, I don't have much experience with handlebars, but it looks like it is an issue related to Vite directly, not vite-express itself. You could try to look for some handlebars plugins, maybe there is something that would help you.
The only thing that I can say, from what I see in your repository, is to ask if you need to specify "SSR" routes in vite.config.js as additional rollup inputs? I think that's the reason why those files are changed during the build step, and if I understand it correctly, express is responsible for rendering those paths using handlebars engine so Vite doesn't need to know about the at all.
If you need to preprocess those handlebars templates during the Vite build process, then maybe there is some kind of Vite's plugin you need to look for, as I suggested.

Due to inactivity, I'll close this issue, feel free to continue this issue if you have any more questions.


add missing Values Prop to MultiSelectProps

Straightforward, but still very needed. @furqanZafar

Coverage remained the same at 88.316% when pulling b7b49641794c59ce985958989a6cd47e86cc317a on chungkikelly-asapp:master into d3f707235cf4f8fca3646421861688678f70f045 on furqanZafar:master.


The widget executes a query in the initialize phase if the input field has already a value

Every time teleport/autocomplete is initialized on one input with a value it automatically performs a query. I guess it isn't a bug but is there any way to prevent this? Thanks.

You can try setting value key in constructor or init options with object { title: <your query value>} . This should prevent query, but I don't know if it prevents refetching that query value again...


[Feature #179] Mesh gen utils

Add mesh generation utilities as requested here: #179

Thanks for the fix. I suggest moving the new extension methods out of Raylib.Utils and into a MeshExtensions class. From there fix the formatting as Raylib-cs now uses file scoped namespaces.


Code fails when I change model, why?

This is a very simple code I think, and I have  a lot of code similar to it,
var id = '54fab5f5f0db68dc7b55f6b5';
mongoose.model('Account').findOne({'_id':id}, function(err, bosa){ ....

And that code failes silently (I have mongoose.debug on)
But just changing the model,
mongoose.model('Package').findOne({'_id':id}, function(err, bosa){ ...

at least shows me the log line
Mongoose: packages.findOne({ _id: ObjectId("54fab5f5f0db68dc7b55f6b5") }) { fields: undefined }
Any ideas for debugging this? Any validation that might have failed and killed the process? What should I look for?

Can you show me what Account and Package schemas look like?


list class not allowed in pydantic nested schema default

I have a class of type pydantic.BaseModel with a chiled pydantic Basemodel with a list attribute.
This is not serializable right now
import pydantic

class Bar(pydantic.BaseModel):
    baz: list[str] = pydantic.Field(default_factory=list)

class Foo(pydantic.BaseModel):
    bar: Bar = pydantic.Field(default_factory=Bar)

print(pas.generate(Foo))

Traceback:
import py_avro_schema as pas

import pydantic

class Bar(pydantic.BaseModel):
    baz: list[str] = pydantic.Field(default_factory=list)

class Foo(pydantic.BaseModel):
    bar: Bar = pydantic.Field(default_factory=Bar)

print(pas.generate(Foo))

Traceback (most recent call last):
  File "/Users/dada_engineer/workspace/private/py-avro-schema/example.py", line 14, in <module>
    print(pas.generate(Foo))
  File "/Users/dada_engineer/workspace/private/py-avro-schema/.venv/lib/python3.9/site-packages/memoization/caching/plain_cache.py", line 42, in wrapper
    result = user_function(*args, **kwargs)
  File "/Users/dada_engineer/workspace/private/py-avro-schema/src/py_avro_schema/__init__.py", line 64, in generate
    schema_dict = schema(py_type, namespace=namespace, options=options)
  File "/Users/dada_engineer/workspace/private/py-avro-schema/src/py_avro_schema/_schemas.py", line 139, in schema
    schema_data = schema_obj.data(names=names)
  File "/Users/dada_engineer/workspace/private/py-avro-schema/src/py_avro_schema/_schemas.py", line 695, in data
    return self.data_before_deduplication(names=names)
  File "/Users/dada_engineer/workspace/private/py-avro-schema/src/py_avro_schema/_schemas.py", line 766, in data_before_deduplication
    "fields": [field.data(names=names) for field in self.record_fields],
  File "/Users/dada_engineer/workspace/private/py-avro-schema/src/py_avro_schema/_schemas.py", line 766, in <listcomp>
    "fields": [field.data(names=names) for field in self.record_fields],
  File "/Users/dada_engineer/workspace/private/py-avro-schema/src/py_avro_schema/_schemas.py", line 826, in data
    field_data["default"] = self.schema.make_default(self.default)
  File "/Users/dada_engineer/workspace/private/py-avro-schema/src/py_avro_schema/_schemas.py", line 908, in make_default
    return {key: _schema_obj(value.__class__).make_default(value) for key, value in py_default}
  File "/Users/dada_engineer/workspace/private/py-avro-schema/src/py_avro_schema/_schemas.py", line 908, in <dictcomp>
    return {key: _schema_obj(value.__class__).make_default(value) for key, value in py_default}
  File "/Users/dada_engineer/workspace/private/py-avro-schema/src/py_avro_schema/_schemas.py", line 162, in _schema_obj
    raise TypeNotSupportedError(f"Cannot generate Avro schema for Python type {py_type}")
py_avro_schema._schemas.TypeNotSupportedError: Cannot generate Avro schema for Python type <class 'list'>

relates to handling of pydantic defaults in #64

@faph this is a problem when having an empty list in defaults. We could not instantiate this sequence schema even if we can detect the type correctly as the constructor requires at least one element in the list.
I'd suggest for now to use schema_obj(value.class) only if the value is supported by any schema.

Sorry correction, we should just use the pydantic schema annotations instead of value.class. Then it works

@faph would be great to have this fix quite soon 😊 sorry for the hurry / pushy behaviour 🙈

That's ok @dada-engineer. Left a few minor comments


Some Questions

I noticed the less memory usage in the update v2.3.3.

How many pages does the reader cache now? Or is the caching completely disabled?
The CPU usage remained the same. Is it possible to reduce the CPU usage?
Image formats supported by the application?

It only cache pages from currently opened folder, and then remove them from cache when you open another folder.
Unfortunately, it's not possible to reduce CPU usage as it needs to render images. I'm still searching for a better solution for rendering images so it doesn't cause stuttering.
currently only ".jpg", ".jpeg", ".png", ".webp", ".svg", ".apng", ".gif", "avif" are supported. as they are natively supported in the framework I'm using. But I plan to add .cbz soon.
If you want to request some format, I can try adding it if possible.
Close the issue if you don't have any more queries.


Option deprecation (envoy.config.filter.accesslog.v2.AccessLog.config)

Title: option deprecation (envoy.config.filter.accesslog.v2.AccessLog.config)
Description:
I've been testing Envoy 1.13 for the last few weeks. The version is bb7ceff4c3c5bd4555dff28b6e56d27f2f8be0a7/1.13.0/Clean/RELEASE/BoringSSL.
Every time I start the proxy I got the following message on logs:
[2020-02-13 08:53:49.967][1][warning][misc] [source/common/protobuf/utility.cc:441] Using deprecated option 'envoy.config.filter.accesslog.v2.AccessLog.config' from file accesslog.proto. This configuration will be removed from Envoy soon. Please see https://www.envoyproxy.io/docs/envoy/latest/intro/deprecated for details.

The used configuration for logging is:
access_log:
  - name: envoy.file_access_log
    config:
      path: "/dev/stdout"

The same configuration applies for several listeners, and the log messages are really logged. So, everything works just fine. But, given that this way of logging is going to change, I decided to move to the new configuration. I got this in my config files:
access_log:
  - name: envoy.access_loggers.file
    typed_config:
      "@type": type.googleapis.com/envoy.config.accesslog.v2.FileAccessLog
      path: "/dev/stdout"

Now I can't get Envoy started. I have this kind of messages in the output:
[2020-02-13 08:50:57.503][1][critical][main] [source/server/server.cc:94] error initializing configuration '/etc/envoy/envoy.yaml': Didn't find a registered implementation for name: 'envoy.access_loggers.file'

I also tried the following configuration, and had the same erroneous message:
access_log:
  - name: envoy.access_loggers.file
    typed_config:
      "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
      path: "/dev/stdout"

So, is it possible that this new logging configurations is not yet available in version 1.13? It would then be included in version 1.14, is that alright?
Greetings

In 1.13 is the extension name is required and envoy.file_access_log is the correct name for the file access logger. Using config for extensions is deprecated and typed_config is preferred. Either the v2 or v3 type should work.
In "1.14-dev" (starting at 9cc7a5ca) the name of the access logger changed to envoy.access_loggers.file, but you may continue to use the deprecated envoy.file_access_log. Also in 1.14-dev (after 08ec4dd7), when using typed_config the name is no longer necessary to determine the extension type. See https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/extension.html.

Perfect. Thank you a lot.


fix cmake command to work with current version

replaced cmake -G "Unix Makefiles" with cmake -G "Unix Makefiles" . to fix #2.

LGTM :+1:


Example Usage

I'm interested in how this dockerfile is used. Do we pull it and work from within the container?

Excellent! Thank you!


The style of default markdown code block is bad.

I'm back again! XD
You can check this article: https://sh.yorushika.xyz/post/code-of-markdown
The first method of code block(markdown default) looks so terrible!

Fixed, I don't use this syntax very much.
Btw, thanks for the support.

Can I add your blog as friend-link? XD

Sure, if u don't mind those poor posts. (Escape)

Though not so many but seems kinda interesting, lol


add filters key to examples

add the filters key so it's clear where the example snippets should be added
context: https://github.com/ekristen/aws-nuke/issues/395#issuecomment-2429676506

@eaudetcobello I appreciate the pull request. I didn't see it until after I was done with mine. I'm going to close this out. The new documentation show examples of it being set under presets, although it can be under account configurations as well. However there is no top level filters in the configuration format.  I'll see what I can do about calling out configurations that use invalid config keys.


feat(decl/tests): add declarative test support

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind documentation

/kind tests

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area commands

/area pkg

/area events

What this PR does / why we need it:
This PR adds support for running declarative tests specification through the Test abstraction. The provided test implementation runs the following logical steps:

Run "before" script
Create test resources
Run test steps
Run test steps cleanup procedures
Destroy test resource
Run "after" script

If running "before" script or creating test resources produces an error, the test execution is aborted, as these logical steps considered prerequisites for test steps execution.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: ekoops
Once this PR has been reviewed and has the lgtm label, please assign alacuku for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

LGTM label has been added.  Git tree hash: 886ed3ed1960939940316129c0382ab5681204d4


Is there any way to use snapshot as an image of hcloud server?

Hi there,
First of all, thanks for your work with maintaining this plugin. I am quite new to Hetzner Cloud and would like to know if there any way to use snapshots as an image of the server, using your plugin?

Hello,
I haven't tried yet, but it should be possible by passing the snapshot ID (which is an integer) as a string to the parameter hcloud_image of this plugin.
This "gotcha" is not specific to this plugin: also if you were to use just Terraform, you would need a way to find the ID, because the name works only for Hetzner-provided images, not for user snapshots.
For example, I use Packer to build snapshots, and use a label like this:
  source "hcloud.cfg" {
    name = "core"
    snapshot_name = "myimage"
    snapshot_labels = {
      "name" : "myimage" <== HERE
    }
  }

just to be able then in Terraform to find it as:
data "hcloud_image" "myimage" {
  with_selector = "name=myimage" <== looking up the label above
}

and finally pass the ID to construct a server:
resource "hcloud_server" "foo" {
  image              = data.hcloud_image.myimage.id  <== SEE `id`
  ...

Exact same reasoning if using Pulumi.
Note that you do not need to pass via Packer. Also if you took the snapshot from the webconsole, you could add a label and then use the same Terraform (or Pulumi) logic to find it.

will add implementation later or feel free to submit your implementation in a PR


Remove garbage generation due to usage of sorted list

The builtin C# SortedList type generates garbage when iterating over it in a foreach loop.
We started using one as a result of PR #444, which was causing about 1.9K of garbage to be generated each frame.
This change introduces our own SortedList type, which is backed by a regular C# list. It isn't self sorting and has to be explicitly sorted after modification. I think this is fine as the lists tend to be quite small, and aren't modified often.
I've profiled the game with this list, and garbage generation is now avoided.

Thanks Tom, could you add pr documentation please. What have you changed and why, etc. Thanks!

Thanks. Did you rename the data structure? Has it changed - it's not showing me a line by line diff, just that offers removed and ocean added.

Yes, the datastructure has completely changed. Using the existing cached sorted list had some weird issues when I tried to use it (for some reason depth stopped rendering). Debugging wasn't super fruitful so I just implemented what I thought we might need from first principles.
It now is just a datastructure backed by a regular list, but with APIs to make it act mostly like a SortedList in that you can provide a comparer for the keys, and it will handle that all for you. It's not super efficient, but it does seem to do the job.

Thanks dude. I stared at it for a while.
I dont think it needs sorting after removing an item? The order should not be broken by a removal i guess.
I think i'd vote for always sorting on add. Basically my philosophy would be that it should keep itself sorted at all times, otherwise 'sorted' is no longer an invariant, and it might be error prone for users.
One last question - do you think we could shave off the enumeration code - i'm not personally attached to foreach loops and i feel a for(int i = 0; i < container.Count(); i++) container.GetItem(i); style setup would work perfectly well. let me know what your thoughts are?
Thanks! Good catch IDing this issue.

Actually the enumeration code is not much at all, so i'd be up for keeping it. i for some reason though it needed more.

Thanks dude. I stared at it for a while.
I dont think it needs sorting after removing an item? The order should not be broken by a removal i guess.
I think i'd vote for always sorting on add. Basically my philosophy would be that it should keep itself sorted at all times, otherwise 'sorted' is no longer an invariant, and it might be error prone for users.
One last question - do you think we could shave off the enumeration code - i'm not personally attached to foreach loops and i feel a for(int i = 0; i < container.Count(); i++) container.GetItem(i); style setup would work perfectly well. let me know what your thoughts are? EDIT: maybe discard this thought as i just rereviewed and it doesnt add much code to have it
Thanks! Good catch IDing this issue.

You are correct about removing elements, so I've removed that code!
As the only way of accessing this array is through the enumerator, and we always resort it (if needed) when the enumerator is accessed, it's completely safe to only resort the array at that point. Therefore I've kept things as-is, but have left it clearer in the comments that is what the intention is.

Ah gotcha, cool.
It all looks good to me, just one more query - could the backing list be private? I'm on my phone so might be missing an obvious reason why it must be public, if so apologies.

Ah gotcha, cool.
It all looks good to me, just one more query - could the backing list be private? I'm on my phone so might be missing an obvious reason why it must be public, if so apologies.

That was literally just me being dumb! It was meant to be private, doing that now. :)


No module named 'emd'

Hi,
When I use EMD loss in losses.py, it showed:
File "/XXX/learning3d/losses/emd.py", line 6, in emd
from emd import EMDLoss
ModuleNotFoundError: No module named 'emd'

same issue.

Hey everyone,
Thanks for pointing out the problems. EMD and Chamfer Distance (CD) implementations will only work if your device has cuda installed in it. You will have to run python3 setup.py install to compile EMD loss.
There are no great CPU based implementations so I am also looking for a good EMD and CD loss implementations. I will update this repository as soon as I find them.

https://github.com/vinits5/learning3d/blob/master/losses/chamfer_distance.py#L42
Chamfer distance loss function is updated with purely PyTorch based implementation. @pb0316 and @TLi347 can you please try it once? Thank you.
I will also try to look for PyTorch based EMD loss function and will update here.


Support parameterized RBAC

It would be nice to support parameterized RBAC. This would allow the ability to define fine-grained roles and permissions to support things like object level permissions and roles.
Here's a django implementation: https://github.com/dimagi/django-prbac

I've studied the mechanism of PRBAC, and it's really more flexible with parameters. However, Golang and Python(at least Django) based on different principle and design practices, which means I need redesign the parameter RBAC to fit Golang.
I wonder what if the permission is turned into a structure, e.g.:
type Permission []string

Then it's possible that checking the privilege like this:
p := Permission{"admin", "article", "add"}
rbac.IsGranted(NOTEXISTS, p, nil)

As thus we will have a level based permission system.
Of cause modification of the current API will be needed, it's an other important thing we must consider carefully.

Or maybe it might be possible to define functions as an interface for permissions just like there is for roles. That way the user of your library could implement how permissions work and if extra functionality is required they can type cast to their implementation. You could do a roles := map[string][]Permission where
type Permission interface {
    ...
}

Just a thought

Yes, it's right way. interface is better than struct.
I will open a new branch for this.

@mikespook any thoughts on when you might release this under master. Or is it ok to use the redesign branch?

There is a dilemma design which has to be solved. The permission part has already completed. I'm working on the test cases of Role recently. However, the progress isn't as fast as I thought. There is some personal stuff need to be done for me.

Now you can implement your own Permission:
type Permission interface {
	Id() string
	Match(Permission) bool
}


Why the prompt-diffusion could generate the depth map?

Hi~ thanks for the excellent job. But I am confused about why the diffusion model could generate the depth map. From my limited knowledge, did the diffusion model have the depth map decoder? As the depth estimation is a regression problem, it is not an RGB Image, right?

Hi Wangyiqi, thanks for your interest! Yes, depth estimation could be formulated as a regression problem, but we reformulate it to be a generation problem and we found stable diffusion could works well on the cross-domain generation given enough information.
"did the diffusion model have the depth map decoder? .. it is not an RGB Image, right" diffusion model has RGB decoder and  RGB includes gray depth images.


Running multiple test function files

When i try to run multiple test files at a time it uses the last function (alphabetical order) for all the functions instead of using their respective functions

Having the same problem.  We're about to wire out project up with a Jenkins and this is a blocker for us.

I created the missing and still had problems with running multiple tests.  I noticed that the new tests I created had an extra wrapper.init(mod) statement.  Once I added that to all of my existing tests I was able to run all tests and everything now passes!

I have updated to 5.8 but i am still getting the same issue :|

tests are running fine individually

Have you moved wrapper.init to before()?

Hi! Did you create the tests that are failing with the latest module version or with a version prior to that.
The fix for the issue is related to the creation of the the test files. wrapper.init() should be inside before() or in it(). i.e. the existing test cases would need to be fixed manually.
-Mikael

On 09 Jun 2016, at 12:49, Rafał Janicki<EMAIL_ADDRESS>wrote:
Have you moved wrapper.init to before()?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/SC5/serverless-mocha-plugin/issues/17#issuecomment-224849294, or mute the thread https://github.com/notifications/unsubscribe/AIARbBvxxG1QyIXrFN0yv4b9o9d82c9Iks5qJ-GvgaJpZM4Ip-ec.

yeah that was the fix thanks, the wrapper.init() was calling earlier thanks for all the help!!!


add insert new record at index ability

in my case, i need spine to insert new record at specific position of spine records, so i did this
        @records.splice(idx,0,record)

Nice little feature, and a test to cover it!!! THANKS!


crd do not need namespace.

/cc @linsun @andraxylia

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: gyliu513
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: frankbu
If they are not already assigned, you can assign the PR to them by writing /assign @frankbu in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

content/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/cc @sdake

@sdake @geeknoid @linsun this should be land in 1.0 release.

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: gyliu513, sdake
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

content/OWNERS [sdake]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


dotneteng-status-staging is returning 500 for deployment notifications

The dotneteng-status-staging site is returning HTTP 500 when deployments post to the deployment endpoint.
Examples:

dotnet-helix-machines-ci 20230818.01
dotnet-helix-service-ci<PHONE_NUMBER>

Release Note Category

[ ] Feature changes/additions
[ ] Bug fixes
[ ] Internal Infrastructure Improvements

Release Note Description

This is happening because of the expired SSL certificate for the Grafana Staging instance. The Status service records the deployment start and end times both in an Azure Table and Grafana. Thus the client would throw an exception when it attempted to connect to Grafana.
As it happens, I fixed the certificate problem about an hour ago.

Deployments are working fine.


Caption view will not update its frame when you rotate the device

Root cause:
extension SSCaptionView {
func setBackground() {
let fadeView = UIView(frame:CGRectMake(0, -100, UIScreen.mainScreen().bounds.width, 130+100)) // Static width, autoresizingMask is not working
...
}
}
the original value is 10000. Not sure why did you change it?  In this case, the fadeView width will be fixed as UIScreen.mainScreen().bounds.width. Did you mean:
max (UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height))
??

maybe you're right.


Unable to pass PostgreSQL connection params

Description
With the recent changes in https://github.com/go-gitea/gitea/blame/79394b340d227182f94bae48cb08a091c78f2ea2/modules/setting/database.go#L160C6-L160C35 it is no longer possible to specify custom connection parameters like binary_parameters=yes by appending them to the Database.Name.
Instead of the actual parameters the parameter separator is passed to getPostgreSQLConnectionString.
Gitea Version
v1.21.0
Can you reproduce the bug on the Gitea demo site?
No - irrelevant since issue is configuration related
How are you running Gitea?
Helm chart v9.5.1 on Kubernetes cluster v1.28.3
Database
PostgreSQL

related #27723

->  Fix incorrect pgsql conn builder behavior #28085

I need to add this parameter in order to connect to the PostgreSQL database via pgbouncer.
My database is named gitea hence I set NAME to gitea?binary_parameters=yes.


CORE-13353: redact salt in logs

https://r3-cev.atlassian.net/browse/CORE-14015 tracks the merge work
Following procedure at https://r3-cev.atlassian.net/wiki/spaces/CB/pages/4396089494/Keeping+release+branches+in+Sync

Closed since we have decided the salt can be logged.


Update README.adoc

I have updated the link of the Travis build status badge.

The UI picture has been updated.


Fix newline characters in descriptions

Example: https://alphagov.github.io/api-catalogue/EA/Tide_Gauge/#tide-gauge

We should either strip these, or attempt to convert them into actual newlines / paragraphs.

The entry for Statistics.gov.scot also appears to have newlines, albeit with a different encoding:

Another one. \n should be parsed and returned as

I think the problem is at:
https://github.com/alphagov/api-catalogue/blob/8de9ac487e6514693a43bdf113533972b54ffb09/source/api_details.html.erb#L26
Rather than using escape_html we can use sanitize
<%= sanitize(@api.description.gsub("\n", "
"), :tags => %w(br), :attributes => %w()) %>

That replaces newlines with
, and tells santize to clean everything except the

Thanks @edent for spotting the other cases! I don't think we have sanitize available becuase Middleman uses Padrino's format helpers rather than ActionView.
It seems like Padrino's simple_format might be a better candidate - it converts single newlines into breaks, and double newlines into paragraphs (source):
simple_format("hello\nworld") => "
hello
world
"

I'm going to hold off changing this for now, because we plan to support Markdown in descriptions, which should also resolve the newline characters by introducing paragraphs.


fix: Show plugins in help for jx

Also removing options command from help, since we don't have it.

/cc ankitm123 tomhobson babadofar


added personal_finance_dashboard project issue no. 459

Added a project for a personal finance dashboard for gssoc-extd made with html css and javascript which is flexible i.e suitable for both mobile and desktop view.

mention the issue no

issue #459


Bug with incorrect behaviour with linkmap

After insert new Record with incorrect link map - our class become "locked" on UI part and it seems that we laso cannot make select from orientjs driver.
Example:
We have property mapLinkTest wth type maplink
WE are going to set map link via console
create vertex RecordContent set recordContentMap = #85:0, recordContentGUID = "5357c9c4-f468-4c2e-98f0-a7442c8d6157", recordContent = {"717618f7-8bbf-49c7-8119-f83c6a8b1b02":#123:123}
#123:123 - there is no any record with this @rid in out database.
WE got response the all ok:
Created vertex 'RecordContent#81:2{recordContentMap:#85:0,recordContentGUID:5357c9c4-f468-4c2e-98f0-a7442c8d6157,recordContent:[1]} v1' in 0.011000 sec(s).
But after select from RecordContent:
select * from RecordContent on UI part (also from nodejs app) - we got
"The command has not been executed"
 P.S. but console (console.sh) made response

+----+-----+---------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------+
|#   |@RID |@CLASS   |recordCon|recordCon|recordContent                                                                                |
+----+-----+---------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------+
|1   |#81:2|Record...|#85:0    |5357c9...|{717618f7-8bbf-49c7-8119-f83c6a8b1b02:#123:123}                                                                                |
+----+-----+---------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------+

@hadson19
do you have a script to reproduce it?

@hadson19 any news on this?

hi @hadson19
any news?

Hi @hadson19
Fixed, it will be available in 2.2.14


Support SSL connections in FrontendStreams

I figured this was a nice way to support SSL in the frontend piece.  The idea is to allow the user of FrontendStream to "upgrade" the connection to an SSL one after receiving SSLRequest.  A convenience method AcceptSSL is provided, but in a real application the user might want to wrap the net.Conn in a bufio writer in the ConnectionUpgradeFunc as well, so the low-level interface is exported.
Thoughts?  Better ideas?

Oh, I forgot: here is the snippet I used to test this approach.

Nice, I think this works. Just a minor naming comment inline.

I now also noticed that there's a semicolon on line 47.  Will have to remove that one as well.

Updated the code.  How does this look?
Also, any thoughts what to do with example/simpleproxy.go?  Should it just generate some random certs at the beginning and support SSL?  Or just reject them cleanly?

Without knowing all the nomenclature for TLS nor FEBE, I would describe this feature more like "replace connection" or "replace io". The returned ReadWriteCloser may have nothing to do with the existing one.

in a real application the user might want to wrap the net.Conn

Maybe "wrap" communicates the intent more clearly.
If it makes anything easier, we don't need to name the func type in the parameter list:
func (c *MessageStream) UpgradeConnection(f func (io.ReadWriteCloser) (io.ReadWriteCloser, error)) error

@cbandy mechanically, I think you're right--this is pretty general. Semantically, though I think this is very close to HTTP connection upgrades and I hesitate to try to support something far outside of that workflow. Any thoughts, @johto?

@johto looks good. Re:

Also, any thoughts what to do with example/simpleproxy.go? Should it just generate some random certs at the beginning and support SSL? Or just reject them cleanly?

If you could generate and check in a snake-oil cert, that'd be great. Otherwise, rejecting is fine and we can expand on the example later.

Without knowing all the nomenclature for TLS nor FEBE, I would describe this feature more like "replace connection" or "replace io". The returned ReadWriteCloser may have nothing to do with the existing one.

@cbandy mechanically, I think you're right--this is pretty general. Semantically, though I think this is very close to HTTP connection upgrades and I hesitate to try to support something far outside of that workflow. Any thoughts, @johto?

Yeah, the naming comes from HTTP connection upgrades, and while technically you could use this method to replace the connection with something completely unrelated, doing that doesn't seem like a good idea.

in a real application the user might want to wrap the net.Conn

Maybe "wrap" communicates the intent more clearly.

I don't find that very descriptive for the TLS use case to be honest.  In my mind, TLS is much more than just a wrapper around the connection.
I do have to admit that UpgradeConnection isn't the perfect name, but so far I haven't come across anything I would find better, either.

If it makes anything easier, we don't need to name the func type in the parameter list:

I found that that made the function signature awfully long, and even cost some readability.

this is very close to HTTP connection upgrades and I hesitate to try to support something far outside of that workflow.

the naming comes from HTTP connection upgrades, and while technically you could use this method to replace the connection with something completely unrelated, doing that doesn't seem like a good idea.

It sounds like AcceptSSL is all we want right now.

in a real application the user might want to wrap the net.Conn in a bufio writer

@johto, can you expand on this? I think the user can (should?) do that before instantiating the stream object.

in a real application the user might want to wrap the net.Conn in a buffo writer

@johto, can you expand on this? I think the user can (should?) do that before instantiating the stream object.

A bufio writer/reader doesn't implement net.Conn, so you can't use it with crypto/tls.  You'd have to first wrap it for the handshake, then pull out the underlying net.Conn, and then re-wrap the result.  That's why I'd just prefer doing unbuffered I/O during the handshake, and wrap the Conn returned by crypto/tls.  I guess you could implement your own net.Conn on top of a buffered reader/writer, but I'm not sure why anyone would bother.
Though I'm not 100% how much one can gain by wrapping a TLS net.Conn with bufio in the first place.  But I still don't think we should give up the flexibility when there's no reason to.

A bufio writer/reader doesn't implement net.Conn

OT: it looks like only RemoteAddr of net.Conn is being used in crypto/tls, and only as a fallback cache key on the client-side when the user fails to populate ServerName... :unamused:
% ag 'LocalAddr|RemoteAddr|SetDeadline|SetReadDeadline|SetWriteDeadline'
tls/conn.go
65:// LocalAddr returns the local network address.
66:func (c *Conn) LocalAddr() net.Addr {
67:     return c.conn.LocalAddr()
70:// RemoteAddr returns the remote network address.
71:func (c *Conn) RemoteAddr() net.Addr {
72:     return c.conn.RemoteAddr()
75:// SetDeadline sets the read and write deadlines associated with the connection.
78:func (c *Conn) SetDeadline(t time.Time) error {
79:     return c.conn.SetDeadline(t)
82:// SetReadDeadline sets the read deadline on the underlying connection.
84:func (c *Conn) SetReadDeadline(t time.Time) error {
85:     return c.conn.SetReadDeadline(t)
88:// SetWriteDeadline sets the write deadline on the underlying connection.
91:func (c *Conn) SetWriteDeadline(t time.Time) error {
92:     return c.conn.SetWriteDeadline(t)
885:// after a fixed time limit; see SetDeadline and SetReadDeadline.

tls/handshake_client.go
106:            cacheKey = clientSessionCacheKey(c.conn.RemoteAddr(), c.config)

I still don't think we should give up the flexibility when there's no reason to

And I don't think we should export features without a tangible use case.

I still don't think we should give up the flexibility when there's no reason to

And I don't think we should export features without a tangible use case.
All that said, the code here looks good to me!

I still don't think we should give up the flexibility when there's no reason to

And I don't think we should export features without a tangible use case.

That's not an unreasonable opinion, but I've been on the worse side of these things way too many times.  Even if we can't come up with a use case for something doesn't mean that there isn't one.  It's really frustrating to learn that you can't do your job properly and instead have to look for a workaround only because someone artificially prevented you from doing something because they couldn't come up with a use case.  If that means that nobody ever calls UpgradeConnection directly, I think that's acceptable, since the alternative might be that someone wants to call UpgradeConnection but can't.
I was not going to send this because I'm probably overreacting in the case of UpgradeConnection, but I'm leaving this here anyway, in hopes that it will make a difference 150 years from now.
Thanks for reviewing, much appreciated.

A bufio writer/reader doesn't implement net.Conn

OT: it looks like only RemoteAddr of net.Conn is being used in crypto/tls, and only as a fallback cache key on the client-side when the user fails to populate ServerName...

Huh.  I guess the idea is just to provide something which is interchangeable with a TCP/UNIX/whatever connection.  I always expected it to do something more with the connection.

While generally I tend to err on the side of less-is-more with respect to interface design, given that the library is already basically about accommodating unusual use cases, the more general hook does make sense, I think.
Also:

I guess you could implement your own net.Conn on top of a buffered reader/writer, but I'm not sure why anyone would bother.

Should we maybe do this for the user? I guess we wouldn't even need to do buffering: just wrap the ReadWriteCloser in something that makes it look like a net.Conn:
type FakeConn struct { io.ReadWriteCloser }
func (f *FakeConn) LocalAddr() net.Addr { return nil }
func (f *FakeConn) RemoteAddr() net.Addr { return nil }
func (f *FakeConn) SetDeadline(t time.Time) error { return nil }
func (f *FakeConn) SetReadDeadline(t time.Time) error { return nil }
func (f *FakeConn) SetWriteDeadline(t time.Time) error { return nil }

Or maybe even return real dummy Addrs if crypto/tls is picky. This isn't pretty, but it's prettier than panicking if someone tries to AcceptSSL on a MessageStream using a non-net.Conn library.
Of course, we'd only do this if the io.ReadWriteCloser is not already a net.Conn.

Should we maybe do this for the user? I guess we wouldn't even need to do buffering: just wrap the ReadWriteCloser in something that makes it look like a net.Conn:

Hmm.  That's not necessarily a bad idea.  Some inspiration here, for example.
If we have an agreement on this, I could amend the PR among these lines.

I think we can consider the lack of objections agreement...?

I think so.  I've got a lot on my plate right now, but I'll try and get this done during the weekend.

How's this version?

lgtm

Sorry, totally dropped the ball here. I can merge this if this is still useful.


semantics : GPath expression section

I linked to the xml processing section and tried to reduce duplicated material with it.
I think this section is complete with this, but suggestions, corrections and comments welcome as always.

Re-reading the semantics section, it appears to me that the style of what I wrote may be too much like a user's-guide and not enough like a language specification.  If you feel strong about this, I can revise the text to be more consise and factual.

Thanks. I ported the docs to GROOVY_2_4_X (but squashed both commits into one).


Mark two features of the Cyclotron milestone as done

Closing in favor ofhttps://github.com/dfinity/public-roadmap-relaunch/pull/17


Houndd version

Fixes #306
Display the version of houndd and exit
usage houndd -version
the version can be set while building
make VERSION=1.1.1 will set the version of houndd to 1.1.1
If no version is provided a default of 1.0.0 is used

This is a good start! I think I'd prefer the version of the cli to be defined in the actual go runtime, rather than passed in as an environment variable at build-time. The version is more related to the contents of the code than when and how it's built.
I think the approach that gopass uses makes a lot of sense. They expose a semver version struct as the source of truth:
https://github.com/gopasspw/gopass/blob/6c94cbef056df696968a7cc4a8594b42c7318bb2/main.go#L253
It makes sense to me to expose the version in a similar way, either as a constant or through a getter function, in hound/cmds/houndd/main.go. Does that sound reasonable?

That will be an easier thing to do, just setting 3 constants and returning a concat of those. The reason I chose build over that approach is because people tend to forget updating these and realize it a bit too late. Another thing that can be done in the current approach is to mandate version provision instead of defaulting it.
Thoughts/ comments ?

Made the relevant changes.
Used similar structure to gopass. It passes semver.Version instead of a string
Ways to provide version are:

Edit the main.go to change the version Major=2 Minor=5 Patch=3 results in 2.5.3 as the version.
Provide it as VERSION flag in make. make VERSION=2.4.3 results in 2.4.3` as the version (which overrides the version given inside the main.go file)

To see the version use houndd -version
Minor change, displayed houndd v1.2.3 instead of just houndd 1.2.3

I agree with you, it isn't a good practice to have 2 sources of truth, thus the first approach ( only via build )
I agree with the idea to have it consistently available at both locations ( code + actual binary )
The only reason I went with the approach I took is to because the reference suggests so ( as they are using the version flag in  multiple locations )
Let me get this sorted and push it.
P.S. Could you mark the pr as hacktober-accepted in the tags.

Add semvar to go.mod
Removed functionality  add version through the makefile
Only way to provide versioning is via code i.e Major Minor And Patch format.

Could I nudge you to either accept/ merge this PR or just add a label as hacktoberfest-accepted as that would help me get my hacktober event completed.
If there are any questions/ideas regarding this PR please feel free to reach out.

@kartikay101 yes, totally. I planned on working through some of the backlog of issues today. I'll add the label for now, but I also hope to get this merged shortly as well. Thanks again for your contribution!

After some local testing, this looks good to me! Thanks again, and I hope you snag that t-shirt!
If you are looking for another issue before the deadline, there's a short one that I just opened. You're welcome to it, but no pressure. I'll be working through some of the other pull requests before I try and implement that fix.


Multiple validations with multiple error message

This Idea came from mongoose. It can be integrated with front-end on the future to automatically show a message to users.
So, it would be good if there are multiple validation functions, to show different messages to different errors.

I like the idea.  Do you want to take on making the changes and creating a PR?  If not, could you provide a couple code examples?

Closing this due to no recent activity. If this is still a problem or you have questions please feel free to comment again with the information @brandongoode asked for above.


Database backed Session does not save when response()->json(...) is returned

The following code looks like it should work, but doesn't:
/**
     * Set session is_married via ajax request
     *
     * @param \Illuminate\Http\Request
     * @return \Illuminate\Http\Response
     */
    public function postIsMarried(Request $request)
    {
            if ($request->input('is_married') === 'married') {
                $request->session()->put('is_married', 1);

            } else {
                $request->session()->put('is_married', 0);
            }
        return response()->json(['message' => $request->session()->get('is_married')], 200);
    }

The json returned reflects the changes made to session, but they don't persist. If request()->view(...) is used they will persist.
I would be willing to work on a fix for this or at least add it to the documentation. Would a pull request persisting the session when response()->json(...) is used be accepted?
Workaround:
/**
     * Set session is_married via ajax request
     *
     * @param \Illuminate\Http\Request
     * @return \Illuminate\Http\Response
     */
    public function postIsMarried(Request $request)
    {
        if ($request->input('is_married') === 'married') {
                $request->session()->put('is_married', 1);
        } else {
                $request->session()->put('is_married', 0);
        }
        $request->session()->save(); //manually save session
        return response()->json(['message' => $request->session()->get('is_married')], 200);
    }

+1

Is this still actual? I cannot replicate the problem.

Which laravel version?

The project is currently on v5.1.16, I don't recall if that was the same version in use when I posted the issue.
I won't be able to look into whether it still occurs under 5.1.16 until later this afternoon, and will update you then.

I'm still having this issue, I'll see if I can create a minimal example.

It works for me with v5.1.24 (v5.1.16 also tested)
use Illuminate\Http\Request;
public function index(Request $request)
{
$request->session()->clear();
$request->session()->put('key', 'value');
dd($request->session()->get('key'));
}
Bug should be closed

@ihoru of course, it works as session is taken from memory during a single run.

So, where is the problem?

The problem is in storing session during several requests.

Could you provide something we can reproduce please?

Also, is this still broken on the new database session driver on 5.2?


Add Personas to Manage (MVP)

Context
As more of our features now depend on specific provider user permissions setup, we want to add some persona users to reduce setup time & effort for manual testing.
Changes proposed in this pull request
Create 6 persona users in review apps / local dev environments:

Admin & normal user of a self-ratifying organisation
Admin & normal user of a multiple organisations
Admin & normal user of a provider with no courses

Guidance to review
Are there any more useful cases to cover here?
It would be nice to have a 'user that needs to set up organisation permissions', but that's not really possible for review apps since they automatically set up all permissions.
Link to Trello card
https://trello.com/c/QeT2O3Sm/4213-add-personas-to-review-apps-with-different-combinations-of-provider-permissions
Things to check

[x] This code does not rely on migrations in the same Pull Request
[x] If this code includes a migration adding or changing columns, it also backfills existing records for consistency
[x] API release notes have been updated if necessary
[x] Required environment variables have been updated added to the Azure KeyVault

As an MVP, we decided to just create persona users and allow log in using the UID in the sign in form. In the future we can add a section to Support and hang off the existing impersonation feature to log in as a persona user (similar to the Publish persona UI). That will also be a better place to put the documentation on each user


Rename canonical names using SMPTE ST 2065-4 as a model

This makes all the parameters camelCase and where appropriate makes them match the SMPTE 2065-4 parameters.
The one major exception is "aperture" which gets confusing with t-number and f-number, so we have left those as tNumber and fNumber for this iteration.
Closes #63

This resolves issue #63

@j-helman What review period do you suggest?

@palemieux I've merged in your changes.


Help for sending commands (like pause and resume) via Charging profile

Hi,
perhaps you can help me a little, in understanding, whats wrong here.
I am trying to build up a smart-charging system by my own.
I use your project to handle a Wallbox.
Currently i am struggling with the following scenario.
The car is connected to the Wallbox, the server receives the "Preparing" Status from the WB - so far so good. Now, i start the charging with:
await sendCommand('RemoteStartTransaction', { connectorId: DEFAULT_CONNECTOR_ID, idTag: DEFAULT_ID_TAG });
Response: "Accepted"

After that, i put the car into pause via Setting a ChargeProfile with the Limit of 0 (which means 0 Amp).
The WB stops charging immediately and the status is "SuspendedEVSE".
After checking, if enough solar-energy is available, i want to start the charging again and send a new profile to the WB with a proper limit of 6A (e.g. 10A). But neither the WB changes to "charging" nor the amp is raised.
Might you be able, to have an idea here?

Hi,
It sounds like you are doing the correct thing.
Can you capture the OCPP logs to/from your charger - it might help identify where things are going wrong.
On the other hand, this might not be an OCPP issue at all. It could simply be that the charging station and/or the EV have an issue that prevents a charging session from resuming from 0 amps.
The logs should make things clearer, if you can provide them.

Hi,
first of all - thanks for your reply :) This is much appreciated!
Perhaps you know the Software "EVCC", which also offers this type of charging with solar. I am trying to build that a bit smaller and they do the same thing (as far as i understand from their code).
Could you provide, how i could capture the logs?
Currently the things look like this:
Function for "Preparing" sourced from StatusNotification:
case 'Preparing': {
   console.log('Wallbox is preparing a new car!');

   // First put the car into pause mode and check requirements
   const response = await sendCommand('SetChargingProfile', generateChargeProfile(0));
   console.log("ChargeProfile", response);

   if (response && response.status == 'Accepted') {
      // Start the Remote
      const response = await sendCommand('RemoteStartTransaction', { connectorId: DEFAULT_CONNECTOR_ID, idTag: DEFAULT_ID_TAG });
      console.log("RemoteTrans", response);
   }

   // Check, if charging is possible
}

Function generateChargeProfile:
/**
 * @param {number} amps
 */
function generateChargeProfile(amps) {
   const now = new Date();
   const timestamp = new Date(now.getTime() - 60 * 1000).toISOString(); // Reduce one minute
   console.log(timestamp);

   return {
      "connectorId": DEFAULT_CONNECTOR_ID,
      "csChargingProfiles": {
         "chargingProfileId": 1,
         "stackLevel": 0,
         "chargingProfilePurpose": "TxDefaultProfile",
         "chargingProfileKind": "Absolute",
         "chargingSchedule": {
            "startSchedule": timestamp,
            "chargingRateUnit": "A",
            "chargingSchedulePeriod": [
               {
                  "startPeriod": 0,
                  "limit": amps
               }]
         }
      }
   }
}

You can log OCPP messages using this module by listening for the 'message' event, like so:
client.on('message', ({message, outbound}) => {
    console.log(outbound ? '>>>' : '<<<', message);
});

Hi, perhaps there is some kind of time synchronisation issue?
Have you tried omitting the startSchedule property? This property is optional, and the charging station should apply the charging schedule immediately if it is omitted.
It would be good to see all of your message logs up until this point (everything for this session up to this point, BootNotification onwards). Including timestamps with each message would also help.

Sure, will set that up again and come back to you shortly.
Thanks for your great help so far!

I would have expected the status of the connector to change to SuspendedEVSE once you set the 0-amp charging profile, but it remained as Charging. Perhaps this is a mistake in the Wallbox reporting that it is charging when it is not?
Try enabling periodic meter values sampling so we can see for sure whether or not the EV is charging.
To do this:

Set the MeterValueSampleInterval config value to something like 30 so we can get a meter reading every 30 seconds.
Set the MeterValuesSampledData config value to "Energy.Active.Import.Register,Current.Offered,Current.Import" so we can get readings of the current and energy flowing.

Let's see what logs we get back then.

Thanks for coming back on this topic 👍
I think, I have had a coding error while putting the Wallbox to pause with 0 Amp.
Will verify that tomorrow again and come back.
In the meantime - what do you think, is the overall best way, to apply the first charge profile, to set the wb into pause?
I want to archive, that the wallbox will be set to pause first, every time a car connects.
After that, I will check the conditions and start charging or leave the wallbox in pause.

Hi,
thanks for sharing all informations and thoughts about my topic. This is much appreciated ;)
I went further with all the things you provided and i found out in the meanwhile. During this period, i got confused a lot cause of the reactions of my wallbox. I think, they implemented OCPP in a "special" way, but dont support the necessary specifications.
Your library is used, to build up an adapter for the automation system iobroker - so dont wonder, why the logging or commands look a bit different ;)
Please have a look at the following things i did so far.
I am starting the server and waiting for the client to connect - this works. After that, i set some configurations, which also works.
Where i start to get confused is:
await this.sendCommand('SetChargingProfile', this.generateChargeProfile(0));

The command JSON is:
>>> 30.11.2024, 11:23:18[2,"ea8bf886-4bbc-4b7f-be3a-f320bca00e95","SetChargingProfile",{"connectorId":1,"csChargingProfiles":{"chargingProfileId":1,"stackLevel":0,"chargingProfilePurpose":"TxDefaultProfile","chargingProfileKind":"Absolute","chargingSchedule":{"chargingRateUnit":"A","chargingSchedulePeriod":[{"startPeriod":0,"limit":0}]}}}]

Answer:
<<< 30.11.2024, 11:23:19[3,"ea8bf886-4bbc-4b7f-be3a-f320bca00e95",{"status": "Accepted"}]

This indicates - from my understanding, that the profile is installed successfully and set to 0A. When i have a look into the Webinterface of my Wallbox, it still says:

After that, i request the MeterValues, which returns, if no car is connected:
OCPP-Charge: {"chargePower":0,"chargeCurrent":32,"meterStart":0,"meterEnd":0,"session":0,"lastValue":4865260.2}

So, the wallbox still is in 32A mode, which is obviously not "correct".
Therefore, i need to send the below command, after the wallbox says it is in "Preparing". chargeAmps here is some variable - mostly 0 for putting the car into pause first.
// First start the RemoteTransAction
const response = await this.sendCommand('RemoteStartTransaction', { connectorId: DEFAULT_CONNECTOR_ID, idTag: DEFAULT_ID_TAG });
if (response.status === 'Accepted') {
	// Set the Wallbox into Pause-Mode or charge directly; depends on status
	const response = await this.sendCommand('SetChargingProfile', this.generateChargeProfile(chargeAmps));
	this.log.info(`[OCPP]: Wallbox has accepted the remote start and is set to ${chargeAmps}A!`);
	this.log.info("[OCPP]: ChargeProfile" + JSON.stringify(response));
}

This puts the car into pause - but using a TxProfile here, is not working - nor sending it directly with the StarteRemoteTransaction. The wallbox returns with Accepted but does not use the profile according to my testing.
So, from my point of view, the OCPP works totally different on "every" wallbox.
Perhaps i misunderstood something? Do you perhaps have any other ideas?

Thanks a lot for your comments!
I will have a look into this again - if I remember it correctly, i set the TXProfile when the wallbox mentions, it is preparing.
Then it is accepting the profile, but not applying it.
What I don't get is, if I send the 0A DefaultTxProfile even a MeterValues request shows the 32A in return.
Will provide you with the logs after preparing the application for this scenario again!


Explicitly nullable input arguments

If an input field in a Query builder is explicitly set to null, it should be included in the "inputs".
This change comes together with a PR on the DGS client module.

PR in DGS client: https://github.com/Netflix/dgs-framework/pull/395

Kotlin code needs updating (pending further discussion), but the Pr looks good otherwise.


New feature

What feature do you want to get added on the base engine?
adding multithreading to the game will make it faster at loading and rendering
To test your sight, and reliability, please select the option of what should be requested.
Code optimization that would make the game faster.

Test = failed


User settings

Add page for changing user settings:

name
image
reset password
danger zone: delete account

Done


Nothing to do with the Enderite Mod.