text:
X-XSRF-TOKEN / CSRF Header not being set on production

It works fine during development but during production the login function from the useSanctumAuth composable does not include the X-XSRF-TOKEN token in the request headers.
Here is my setup:
Nuxt SPA:

Built using nuxt generate CSR mode (with SSR set to false in nuxt.config.js).
Hosted using the domain name frontend-test.abc.com.ph

Laravel Backend:

.env values

SANCTUM_STATEFUL_DOMAINS=*abc.com.ph (also tried frontend-test.abc.com.ph and "abc.com.ph,*abc.com.ph,frontend-test.abc.com.ph")
SESSION_DOMAIN=.abc.com.ph (also tried the default value and "abc.com.ph")

Hosted using the domain name api-test.abc.com.ph
login route defined in web.php without the auth:sanctum middleware
cors.php includes all paths

Network tab Request/Response:

The initial request to api-test.abc.com.ph/sanctum/csrf-cookie returns cookies including the XSRF-TOKEN, laravel_session and some random cookie name.
The subsequent request to api-test.abc.com.ph/login returns a status of 419 specifically with the error message of CSRF Token mismatch.
Upon checking the Cookies Tab it contains the following:

(The domain value just contains api-test.abc.com.ph)

I'm having a similar issue, but for me it authenticates properly but when I call /api/user I get a 401 error

I'm having a similar issue, but for me it authenticates properly but when I call /api/user I get a 401 error

May I ask how did you manage to authenticate the user? Did you also use the login function of useSanctumAuth composable and do we have the same frontend and backend setup?
As for the 401 error, have you tried adding the domain of your frontend in the SANCTUM_STATEFUL_DOMAINS env variable in your laravel backend? Hope it helps.

@hbsmarku Yes, I did all that, the only thing I didn't do it install breeze because I only need sanctum, but I did all the necessary modifications:

CORS
Sanctum Statefull domains
Frontend URL
Cookie Session

This only happens on the server, in local it works without issue

for me it authenticates properly but when I call /api/user I get a 401 error

Do you also use CSR mode or SSR?

@manchenkoff here are is my Nuxt config
sanctum: {
        baseUrl: "http://localhost:8000",
        userStateKey: "sanctum.user.identity",
        redirectIfAuthenticated: true,
        origin: process.env.NUXT_PUBLIC_SANCTUM_BASE_URL,
        endpoints: {
            csrf: "/sanctum/csrf-cookie",
            login: "/login",
            logout: "/api/logout",
            user: "/api/user",
        },
        redirect: {
            keepRequestedRoute: false,
            onLogin: "/",
            onLogout: "/auth/login",
            onAuthOnly: "/auth/login",
            onGuestOnly: "/auth/login",
        },
    },

For the response headers I'll use the picture in the first comment as an example because I had to make changes

@KiritoXD01 but in your nuxt config you have your localhost as a baseUrl, are you trying to access remote production from the local machine?

In local by default I have like this but on the server I use the env NUXT_PUBLIC_SANCTUM_BASE_URL and is set to the server URL, let me turn on the server to send you the request

Nuxt module config (sanctum)
Request / Response details for both calls from Nuxt (csrf retrieval, login request)
Laravel config details (sanctum.php, cors.php, session.php, Http/Kernel.php) with corresponding values in .env

Please attach all the information mentioned in my previous message, w/o it I won't be able help much

@manchenkoff here is everything
Nuxt Config:
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
    ssr: false,
    modules: [
        "@nuxtjs/tailwindcss",
        "nuxt-icon",
        "nuxt-auth-sanctum",
        "@pinia/nuxt",
    ],
    sanctum: {
        baseUrl: "http://localhost:8000",
        userStateKey: "sanctum.user.identity",
        redirectIfAuthenticated: true,
        origin: process.env.NUXT_PUBLIC_SANCTUM_BASE_URL,
        endpoints: {
            csrf: "/sanctum/csrf-cookie",
            login: "/login",
            logout: "/api/logout",
            user: "/api/user",
        },
        redirect: {
            keepRequestedRoute: false,
            onLogin: "/",
            onLogout: "/auth/login",
            onAuthOnly: "/auth/login",
            onGuestOnly: "/auth/login",
        },
    },
});

Request/response
Request List

Sanctum CSRF response

Login Response:

User Response:

Cors.php
[
'paths' => ['*'],

    'allowed_methods' => ['*'],

    'allowed_origins' => [env('FRONTEND_URL', 'http://localhost:3000')],

    'allowed_origins_patterns' => [],

    'allowed_headers' => ['*'],

    'exposed_headers' => [],

    'max_age' => 0,

    'supports_credentials' => true,
]

Http/Kernel.php

here are the keys

@manchenkoff even when I have the baseUrl as localhost, in the server when I set the env it updates it and sends the right API domain

@KiritoXD01 thx for attachments, I'll check it today, meanwhile have you tried to set up the Laravel session domain with a dot at the beginning - .portalpass.com.do?

@manchenkoff Yes, and also without it

@manchenkoff could Docker be a reason for it to fail? just thinking about it

@KiritoXD01 no, I also use docker for everything, works fine, but the tricky part is always related to Laravel domains, for example you cannot just use domain in SANCTUM_STATEFUL_DOMAINS, you have to pass all urls like "frontend.website.com" and register ".website.com" as SESSION_DOMAIN, also same url should be in Origin header in each request from Nuxt

What about the SESSION_SECURE_COOKIE?, I have as false for now

@manchenkoff it worked now, it was not the library at the end, The backend was not getting the env properly when I debugged XD, it works perfectly now

Hey @hbsmarku @KiritoXD01
Usually this type of error is related to backend configuration on Laravel side, but to make sure that it's properly configured, could you send the following information?

Nuxt module config (sanctum)
Request / Response details for both calls from Nuxt (csrf retrieval, login request)
Laravel config details (sanctum.php, cors.php, session.php, Http/Kernel.php) with corresponding values in .env

I'll try to check it out today and get back to you, in the meantime I would suggest double-checking this link - Nuxt Auth Sanctum Docs for Laravel
In the meantime, you can check closed issues as well, there might be something useful for your cases

@manchenkoff here is my full setup:
Nuxt Config
// https://nuxt.com/docs/api/configuration/nuxt-config
let development = process.env.NODE_ENV !== 'production'

export default defineNuxtConfig({
  modules: ["nuxt-auth-sanctum", "nuxt-quasar-ui", "@nuxt/image"],
  devtools: {
    enabled: true,
    timeline: {
      enabled: true,
    },
  },
  ssr: false,
  sanctum: {
    origin: development ? "http://127.0.0.1:3000" : undefined, // Your Nuxt app
    baseUrl: development ? "http://127.0.0.1:8000" : "https://xx-project-api.xx.com.ph", // Your Laravel API
    redirect: {
      onLogin: "/dashboard",
      onLogout: "/login",
    },
    endpoints: {
        csrf: '/sanctum/csrf-cookie',
        login: '/login',
        logout: '/logout',
        user: '/api/user',
    },
    csrf: {
        cookie: 'XSRF-TOKEN',
        header: 'X-XSRF-TOKEN',
    },
  },
});

Request / Response

CSRF Token

Login request

sanctum.php
<?php

use Laravel\Sanctum\Sanctum;

return [

    /*
    |--------------------------------------------------------------------------
    | Stateful Domains
    |--------------------------------------------------------------------------
    |
    | Requests from the following domains / hosts will receive stateful API
    | authentication cookies. Typically, these should include your local
    | and production domains which access your API via a frontend SPA.
    |
    */

    'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
        '%s%s',
        'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
        Sanctum::currentApplicationUrlWithPort()
    ))),

    /*
    |--------------------------------------------------------------------------
    | Sanctum Guards
    |--------------------------------------------------------------------------
    |
    | This array contains the authentication guards that will be checked when
    | Sanctum is trying to authenticate a request. If none of these guards
    | are able to authenticate the request, Sanctum will use the bearer
    | token that's present on an incoming request for authentication.
    |
    */

    'guard' => ['web'],

    /*
    |--------------------------------------------------------------------------
    | Expiration Minutes
    |--------------------------------------------------------------------------
    |
    | This value controls the number of minutes until an issued token will be
    | considered expired. This will override any values set in the token's
    | "expires_at" attribute, but first-party sessions are not affected.
    |
    */

    'expiration' => 1,

    /*
    |--------------------------------------------------------------------------
    | Token Prefix
    |--------------------------------------------------------------------------
    |
    | Sanctum can prefix new tokens in order to take advantage of numerous
    | security scanning initiatives maintained by open source platforms
    | that notify developers if they commit tokens into repositories.
    |
    | See: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning
    |
    */

    'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''),

    /*
    |--------------------------------------------------------------------------
    | Sanctum Middleware
    |--------------------------------------------------------------------------
    |
    | When authenticating your first-party SPA with Sanctum you may need to
    | customize some of the middleware Sanctum uses while processing the
    | request. You may change the middleware listed below as required.
    |
    */

    'middleware' => [
        'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class,
        'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
        'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
    ],

];

cors.php
<?php

$allowed_origins = env('APP_ENV') == 'development' ? ['*'] : ['*.xx.com.ph'];

return [

    /*
    |--------------------------------------------------------------------------
    | Cross-Origin Resource Sharing (CORS) Configuration
    |--------------------------------------------------------------------------
    |
    | Here you may configure your settings for cross-origin resource sharing
    | or "CORS". This determines what cross-origin operations may execute
    | in web browsers. You are free to adjust these settings as needed.
    |
    | To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
    |
    */

    'paths' => ['api/*', 'sanctum/csrf-cookie', '*'],

    'allowed_methods' => ['*'],

    'allowed_origins' => $allowed_origins,

    'allowed_origins_patterns' => [],

    'allowed_headers' => ['*'],

    'exposed_headers' => [],

    'max_age' => 0,

    'supports_credentials' => true,

];

session.php
<?php

use Illuminate\Support\Str;

return [

    /*
    |--------------------------------------------------------------------------
    | Default Session Driver
    |--------------------------------------------------------------------------
    |
    | This option controls the default session "driver" that will be used on
    | requests. By default, we will use the lightweight native driver but
    | you may specify any of the other wonderful drivers provided here.
    |
    | Supported: "file", "cookie", "database", "apc",
    |            "memcached", "redis", "dynamodb", "array"
    |
    */

    'driver' => env('SESSION_DRIVER', 'cookie'),

    /*
    |--------------------------------------------------------------------------
    | Session Lifetime
    |--------------------------------------------------------------------------
    |
    | Here you may specify the number of minutes that you wish the session
    | to be allowed to remain idle before it expires. If you want them
    | to immediately expire on the browser closing, set that option.
    |
    */

    'lifetime' => env('SESSION_LIFETIME', 120),

    'expire_on_close' => false,

    /*
    |--------------------------------------------------------------------------
    | Session Encryption
    |--------------------------------------------------------------------------
    |
    | This option allows you to easily specify that all of your session data
    | should be encrypted before it is stored. All encryption will be run
    | automatically by Laravel and you can use the Session like normal.
    |
    */

    'encrypt' => false,

    /*
    |--------------------------------------------------------------------------
    | Session File Location
    |--------------------------------------------------------------------------
    |
    | When using the native session driver, we need a location where session
    | files may be stored. A default has been set for you but a different
    | location may be specified. This is only needed for file sessions.
    |
    */

    'files' => storage_path('framework/sessions'),

    /*
    |--------------------------------------------------------------------------
    | Session Database Connection
    |--------------------------------------------------------------------------
    |
    | When using the "database" or "redis" session drivers, you may specify a
    | connection that should be used to manage these sessions. This should
    | correspond to a connection in your database configuration options.
    |
    */

    'connection' => env('SESSION_CONNECTION'),

    /*
    |--------------------------------------------------------------------------
    | Session Database Table
    |--------------------------------------------------------------------------
    |
    | When using the "database" session driver, you may specify the table we
    | should use to manage the sessions. Of course, a sensible default is
    | provided for you; however, you are free to change this as needed.
    |
    */

    'table' => 'sessions',

    /*
    |--------------------------------------------------------------------------
    | Session Cache Store
    |--------------------------------------------------------------------------
    |
    | While using one of the framework's cache driven session backends you may
    | list a cache store that should be used for these sessions. This value
    | must match with one of the application's configured cache "stores".
    |
    | Affects: "apc", "dynamodb", "memcached", "redis"
    |
    */

    'store' => env('SESSION_STORE'),

    /*
    |--------------------------------------------------------------------------
    | Session Sweeping Lottery
    |--------------------------------------------------------------------------
    |
    | Some session drivers must manually sweep their storage location to get
    | rid of old sessions from storage. Here are the chances that it will
    | happen on a given request. By default, the odds are 2 out of 100.
    |
    */

    'lottery' => [2, 100],

    /*
    |--------------------------------------------------------------------------
    | Session Cookie Name
    |--------------------------------------------------------------------------
    |
    | Here you may change the name of the cookie used to identify a session
    | instance by ID. The name specified here will get used every time a
    | new session cookie is created by the framework for every driver.
    |
    */

    'cookie' => env(
        'SESSION_COOKIE',
        Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
    ),

    /*
    |--------------------------------------------------------------------------
    | Session Cookie Path
    |--------------------------------------------------------------------------
    |
    | The session cookie path determines the path for which the cookie will
    | be regarded as available. Typically, this will be the root path of
    | your application but you are free to change this when necessary.
    |
    */

    'path' => '/',

    /*
    |--------------------------------------------------------------------------
    | Session Cookie Domain
    |--------------------------------------------------------------------------
    |
    | Here you may change the domain of the cookie used to identify a session
    | in your application. This will determine which domains the cookie is
    | available to in your application. A sensible default has been set.
    |
    */

    'domain' => env('SESSION_DOMAIN'),

    /*
    |--------------------------------------------------------------------------
    | HTTPS Only Cookies
    |--------------------------------------------------------------------------
    |
    | By setting this option to true, session cookies will only be sent back
    | to the server if the browser has a HTTPS connection. This will keep
    | the cookie from being sent to you when it can't be done securely.
    |
    */

    'secure' => env('SESSION_SECURE_COOKIE'),

    /*
    |--------------------------------------------------------------------------
    | HTTP Access Only
    |--------------------------------------------------------------------------
    |
    | Setting this value to true will prevent JavaScript from accessing the
    | value of the cookie and the cookie will only be accessible through
    | the HTTP protocol. You are free to modify this option if needed.
    |
    */

    'http_only' => true,

    /*
    |--------------------------------------------------------------------------
    | Same-Site Cookies
    |--------------------------------------------------------------------------
    |
    | This option determines how your cookies behave when cross-site requests
    | take place, and can be used to mitigate CSRF attacks. By default, we
    | will set this value to "lax" since this is a secure default value.
    |
    | Supported: "lax", "strict", "none", null
    |
    */

    'same_site' => 'lax',

    /*
    |--------------------------------------------------------------------------
    | Partitioned Cookies
    |--------------------------------------------------------------------------
    |
    | Setting this value to true will tie the cookie to the top-level site for
    | a cross-site context. Partitioned cookies are accepted by the browser
    | when flagged "secure" and the Same-Site attribute is set to "none".
    |
    */

    'partitioned' => false,

];

Kernel.php
<?php

namespace App\Http;

use Illuminate\Foundation\Http\Kernel as HttpKernel;

class Kernel extends HttpKernel
{
    /**
     * The application's global HTTP middleware stack.
     *
     * These middleware are run during every request to your application.
     *
     * @var array<int, class-string|string>
     */
    protected $middleware = [
        // \App\Http\Middleware\TrustHosts::class,
        \App\Http\Middleware\TrustProxies::class,
        \Illuminate\Http\Middleware\HandleCors::class,
        \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
        \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
        \App\Http\Middleware\TrimStrings::class,
        \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
    ];

    /**
     * The application's route middleware groups.
     *
     * @var array<string, array<int, class-string|string>>
     */
    protected $middlewareGroups = [
        'web' => [
            \Illuminate\Routing\Middleware\ThrottleRequests::class.':web',
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            \App\Http\Middleware\VerifyCsrfToken::class,
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],

        'api' => [
            \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
            \Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],
    ];

    /**
     * The application's middleware aliases.
     *
     * Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
     *
     * @var array<string, class-string|string>
     */
    protected $middlewareAliases = [
        'auth' => \App\Http\Middleware\Authenticate::class,
        'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
        'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
        'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
        'can' => \Illuminate\Auth\Middleware\Authorize::class,
        'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
        'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
        'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class,
        'signed' => \App\Http\Middleware\ValidateSignature::class,
        'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
        'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
    ];
}

.env
SANCTUM_STATEFUL_DOMAINS="*xx.com.ph"
SESSION_DOMAIN="xx.com.ph"

Hey @hbsmarku, thanks for the details sharing, here are some recommendations, please apply and let me know if it helps or not!

origin: development ? "http://127.0.0.1:3000" : undefined, // Your Nuxt app

You can remove this line completely if you use >= 0.0.16

SANCTUM_STATEFUL_DOMAINS="*xx.com.ph"

Replace pattern matching with the full URL here like my-project-frontend.xx.com.ph

SESSION_DOMAIN="xx.com.ph"

Session domain must start with dot before TLD when you use subdomains - .xx.com.ph

$allowed_origins = env('APP_ENV') == 'development' ? ['*'] : ['*.xx.com.ph'];

Here you also should pass all available URLs like my-project-frontend.xx.com.ph instead of *.xx.com.ph. I personally use same list of domains like in SANCTUM_STATEFUL_DOMAINS.

'paths' => ['api/*', 'sanctum/csrf-cookie', '*'],

Since you have '*' as the last option, there is no need in keeping 'api/*' and 'sanctum/csrf-cookie'

'middleware' => [
'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class,
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
],

No need to use authenticate_session middleware here

@manchenkoff Thank you, I have tried your recommendations. Unfortunately, I'm still facing the same response error during login. I've also noticed that there is still no X-XSRF-TOKEN in the headers of the request.

How to fix this issues?

I tried to output the XSRF-TOKEN value and its value is undefined even if there is a cookie value set in the cookies tab.

Yes, it happens only when you have different domains on your backend and it's not the same as caller host (origin). You can also take a look at similar problem in #13, but that one was related to Homestead environment.

I tried to output the XSRF-TOKEN value and its value is undefined even if there is a cookie value set in the cookies tab.

Yes, it happens only when you have different domains on your backend and it's not the same as caller host (origin). You can also take a look at similar problem in #13, but that one was related to Homestead environment.
I would suggest debugging your Laravel app to make sure that all environments are set properly and have the same values that you pass from Nuxt app on csrf-cookie request. Might be config cache as well.

@manchenkoff hello, thank you again for the response.
I have already read and tried to implement the solutions mentioned in #13 and other related issues. Still facing the same issue in production.

The frontend is hosted at frontend.xx.com.ph
Backend at api.xx.com.ph
I also tried to move the backend to xx.com.ph
I did not try to move the frontend to xx.com.ph since there will be multiple frontend endpoints with the same top-level domain (e.g. frontend1.xx.com.ph, frontend2.xx.com.ph, etc.) connecting with the same backend.

The csrf cookie endpoint properly returns the cookies. The problem seems to be always the missing X-XSRF-TOKEN header during login. The usecookie composable cannot get the cookie value of XSRF-TOKEN, even if the cookie exists in the cookies tab. I am also clearing my laravel's backend config cache for every changes.
I think the problem lies within the nuxt project. Does deploying my nuxt site as a static and csr-mode related with this issue? Or just like what you've said that I cannot get the cookie value since the domain of the cookie is set as api.xx.com.ph and not frontend.xx.com.ph? If yes, how can I configure my app so that the usecookie composable properly gets the cookie value set by laravel? I hope there is a solution or workaround with this issue, thank you.

I think the problem lies within the nuxt project. Does deploying my nuxt site as a static and csr-mode related with this issue? Or just like what you've said that I cannot get the cookie value since the domain of the cookie is set as api.xx.com.ph and not frontend.xx.com.ph?

Your cookie have to be set on .xx.com.ph instead of api.xx.com.ph, and this is SESSION_DOMAIN setting on Laravel side, since it is not the same TLD - Nuxt has no access to those cookies.
For example, I use this configuration:

Frontend Nuxt app at frontstore.website.com
Backoffice Nuxt app at backoffice.website.com
API Laravel app at api.website.com

I registered both domains SANCTUM_STATEFUL_DOMAINS=frontstore.website.com,backoffice.website.com and set SESSION_DOMAIN=.website.com, after that I can work with the same session in both applications.

I think the problem lies within the nuxt project. Does deploying my nuxt site as a static and csr-mode related with this issue? Or just like what you've said that I cannot get the cookie value since the domain of the cookie is set as api.xx.com.ph and not frontend.xx.com.ph?

Your cookie have to be set on .xx.com.ph instead of api.xx.com.ph, and this is SESSION_DOMAIN setting on Laravel side, since it is not the same TLD - Nuxt has no access to those cookies.
For example, I use this configuration:

Frontend Nuxt app at frontstore.website.com
Backoffice Nuxt app at backoffice.website.com
API Laravel app at api.website.com

I registered both domains SANCTUM_STATEFUL_DOMAINS=frontstore.website.com,backoffice.website.com and set SESSION_DOMAIN=.website.com, after that I can work with the same session in both applications.

Sadly I've already tried that configuration (SESSION_DOMAIN=.xx.com.ph), and the cookie domain name is still is api.xx.com.ph and is still inaccessible by the useCookie composable.

I've already tried that configuration (SESSION_DOMAIN=.xx.com.ph), and the cookie domain name is still is api.xx.com.ph

and this is a problem you should find a way to fix, it's irrelevant to this module, so unfortunately there is not much I can help with. You can try to find some Laravel related topics like this one - Auth session not working across subdomains

I've already tried that configuration (SESSION_DOMAIN=.xx.com.ph), and the cookie domain name is still is api.xx.com.ph

and this is a problem you should find a way to fix, it's irrelevant to this module, so unfortunately there is not much I can help with. You can try to find some Laravel related topics like this one - Auth session not working across subdomains

Thank you for your insights, the problem is indeed on the backend-laravel side of my application. My hosted environment seems to cache the old environment. It properly works now after clearing the cache, thank you! I am now closing this issue.

authors: KiritoXD01 hbsmarku manchenkoff marcusaaronb

repo: manchenkoff/nuxt-auth-sanctum


text:
add a 'strings' command

It would be cool if GoReSym had a built-in command like strings that could be run on a compiled golang binary.
See Also
I did some quick googling and came across this tool written in python that wraps radare2:

https://reverseengineering.stackexchange.com/questions/24999/extracting-strings-from-go-binaries

https://github.com/ivision-research/gostringsr2

gostringsr2
gostringsr2 extracts strings from a Go binary using radare2

https://github.com/goretk/redress/issues/33

agree this would be useful!
additional research and implementation here: https://github.com/mandiant/flare-floss/blob/master/floss/language/go/extract.py

Hi! I would like to look into this and try and see if I can work on it. What knowledge would I need in order to do so? I am familiar with python programming and have done Golang Reverse-Engineering in the past, and am also familiar with memory, would I be a good fit?

hey @the-m3chanic if you're interested in working on this, I say absolutely take a shot at it! We are interested in a near direct port of the capa python string extraction logic (https://github.com/mandiant/flare-floss/blob/master/floss/language/go/extract.py) into GoReSym. That would mean take the existing python code and re-write it to GoLang for inclusion in GoReSym. Requirements:

Add the new command as a -strings commandline flag. If the -strings flag is present GoReSym should execute the string extraction logic and output the strings as a new entry in GoReSym's JSON output. If it's not present, do not do any string parsing of any kind.
Test the string extraction logic on all versions of Go. Extend the existing (basic) unit tests to verify that some strings are correctly extracted from each Go version we test again. I have a helper script that uses a dockerfile to build example binaries of each Go version easily, see https://github.com/mandiant/GoReSym/blob/master/build_test_files.sh and https://github.com/mandiant/GoReSym/blob/master/main_test.go which is executed by go test

There's no pressure for this work, if you make progress just submit a PR. I will merge the work after a few rounds of code review when the quality is up to par. Thanks for you interest!

Thank you so much for all the info and help! I will start working on this right away, however a little slow-paced as I have my end-semester exams coming up. I shall keep you posted on my progress. 👍
(Is there any way I can contact you to maintain communication? If you're okay with that)

There is no rush at all @the-m3chanic any contributions you decide to submit are purely up to you. As far as contact I'd prefer to work via github, that is the easiest for me to keep track of. If you require more hands on mentoring later we can cross that bridge later. For now, just submit issues and/or pull requests as you see fit and I will get to responding to them as I'm available

source: gharchive/issue

repo: mandiant/GoReSym

license: MIT

license_type: permissive

license_source: github-api


text:
Method to identify an incomplete CAPE report

Hello, thank you for reading this issue.
I am currently using an unofficial version of CAPE, which seems to cause some fields to be missing in the CAPE reports. CAPA is unable to recognize these reports, resulting in the following error message:
D:\Study\capa-v7.0.1-windows>capa D:\Study\analyses\jsons\2496_reports_report.json -d
DEBUG:capa:--------------------------------------------------------------------------------
DEBUG:capa: Using default embedded rules.
DEBUG:capa: To provide your own rules, use the form capa.exe -r ./path/to/rules/  /path/to/mal.exe.
DEBUG:capa: You can see the current default rule set here:
DEBUG:capa:     https://github.com/mandiant/capa-rules
DEBUG:capa:--------------------------------------------------------------------------------
DEBUG:capa:--------------------------------------------------------------------------------
DEBUG:capa: Using default embedded signatures.
DEBUG:capa: To provide your own signatures, use the form capa.exe --signature ./path/to/signatures/  /path/to/mal.exe.
DEBUG:capa:--------------------------------------------------------------------------------
DEBUG:capa.rules:reading rules from directory C:\Users\DavidLee\AppData\Local\Temp_MEI336362\rules
DEBUG:capa.rules.cache:loading rule set from cache: C:\Users\DavidLee\AppData\Local\Temp_MEI336362\cache\capa-d2f2a22b.cache
DEBUG:capa:successfully loaded 866 rules
Traceback (most recent call last):
File "main.py", line 944, in
File "main.py", line 806, in main
File "main.py", line 643, in get_file_extractors_from_cli
File "loader.py", line 291, in get_file_extractors
File "features\extractors\cape\extractor.py", line 126, in from_report
File "pydantic\main.py", line 503, in model_validate
pydantic_core._pydantic_core.ValidationError: 3 validation errors for CapeReport
target.file.sha3_384
Field required [type=missing, input_value={'name': '5ceb25d26af3df6...: '2008-07-28 08:11:35'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.4/v/missing
CAPE
Input should be a valid dictionary or instance of Cape [type=model_type, input_value=[], input_type=list]
For further information visit https://errors.pydantic.dev/2.4/v/model_type
dropped.0.sha3_384
Field required [type=missing, input_value={'name': 'msupdate.exe', ...al\Temp\msupdate.exe'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.4/v/missing
[28876] Failed to execute script 'main' due to unhandled exception!
Could you kindly suggest a method for batch processing these reports to ensure compatibility with CAPA?
The JSON report generated by CAPE has been attached.
2496_reports_report.json
Thank you for your attention.

You can try to mark sha3_384 optional here:
https://github.com/mandiant/capa/blob/7debc54dbd90372af8f4e3b1819fe632afdaa3fa/capa/features/extractors/cape/models.py#L233
I can take a closer look next week.

@Iroxious, please check if https://github.com/mandiant/capa/pull/2042 fixes this for you.

@Iroxious, please check if #2042 fixes this for you.

It worked! Thank you very much for your assistance!

@Iroxious, can you provide an excerpt how the CAPE data looks like when it's not an empty list?

I'm sorry, I cannot determine the type of the non-empty value of the CAPE field. Due to time constraints and configuration environment reasons, we are currently unable to directly use the original CAPE code.
The previous speculation that the version of CAPE might affect the field values was somewhat arbitrary, as there is also a possibility that using the original CAPE code may result in such empty values.

I'm sorry, I cannot determine the type of the non-empty value of the CAPE field. Due to time constraints and configuration environment reasons, we are currently unable to directly use the official CAPE code.
The previous speculation that the version of CAPE might affect the field values was somewhat arbitrary, as there is also a possibility that using the official CAPE code may result in such empty values, but we are temporarily unable to ascertain.

authors: Iroxious mr-tz

repo: mandiant/capa

license_source: bigquery


text:
extra claims are ignored by getIdentityClaims()

access_token: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJXSDN5aEpJSlFRNEtWT2Q3THBRQUpQdW5kRWRtOGV5d0tsREFmZE9ZcVlrIn0.eyJqdGkiOiI5NzMwYTc5NC05NmFjLTQxMmYtODRiNy1iZDM1MTEwYTQ4NjUiLCJleHAiOjE1MDQ4NzE3NzQsIm5iZiI6MCwiaWF0IjoxNTA0ODcwODc0LCJpc3MiOiJodHRwczovL2Nvbm5lY3QuaWNvZC5kZS9hdXRoL3JlYWxtcy90ZXN0cmVhbG0iLCJhdWQiOiJwdWJsaWMiLCJzdWIiOiJmMzFmMmQ0Mi1kZjg4LTQxMTMtYWRjYi1mNWNlYmZjYTVkZmEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJwdWJsaWMiLCJub25jZSI6InYzS084UkM3N2kzUmFnU0VrYndmMUhkM1JTQllGNkw5bXdRbEM4bHUiLCJhdXRoX3RpbWUiOjE1MDQ4Njk5MjYsInNlc3Npb25fc3RhdGUiOiI3ZjU5YTUzOC02NjVlLTRiNDEtODdhMS0zNzRjMzRmNmJjYjAiLCJhY3IiOiIwIiwiYWxsb3dlZC1vcmlnaW5zIjpbImh0dHA6Ly9sb2NhbGhvc3Q6ODA4MCIsImh0dHA6Ly9uZy5sb2NhbCIsImh0dHA6Ly9sb2NhbGhvc3Q6NDIwMCJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsidW1hX2F1dGhvcml6YXRpb24iLCJ1c2VyIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsidGVzdGNsaWVudCI6eyJyb2xlcyI6WyJ0dXNlciJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwibmFtZSI6IkRhcmtvIEx1a2V0aWMiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJ0ZXN0dXNlciIsImdpdmVuX25hbWUiOiJEYXJrbyIsImZhbWlseV9uYW1lIjoiTHVrZXRpYyIsImVtYWlsIjoiaW5mb0BpY29kLmRlIn0.XPWemGO4LNWJGZBK37ylomjpTWCNfXSN67GM8y1ZMucaHc12l43f4foZjyPfTW-ghLBdEGksVZ4y8t5B1xFqoPeNzTp5I1UtTlULsj6KiNJzZlrutOl8YDhu9ZoFgmWKFIJjDFYSWLxd64GsLvF_IP7b0rKhrXKRHKGOT01zJ5IBb5fCkgFtvEOcyU2T8ddmppkXol5hzpRwZc0CMElSve8yanqdmTXZCIA9HJ1UvDhwE4E7vfPs93wnA0YYsqF71MZNPTT1hF9apbKtlJR_1H1llpoPqgZ1mMhHBAb_aJuiWtK_Ozee3gwah6lMqiXnkg2pl0utdlJtvfPHtVKFWAeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
^= payload (according to jwt.io):
{
  "jti": "0ec5da86-16c8-4e68-9cad-569e77ff1107",
  "exp": 1504872826,
  "nbf": 0,
  "iat": 1504871926,
  "iss": "https://connect.icod.de/auth/realms/testrealm",
  "aud": "public",
  "sub": "f31f2d42-df88-4113-adcb-f5cebfca5dfa",
  "typ": "Bearer",
  "azp": "public",
  "nonce": "Nhya8ekal9yulmktNEVzCKaIuSXlbtd4GwLvYybD",
  "auth_time": 1504871926,
  "session_state": "890da13e-4861-48cf-b378-6bd095cc6926",
  "acr": "1",
  "allowed-origins": [
    "http://localhost:8080",
    "http://ng.local",
    "http://localhost:4200"
  ],
  "realm_access": {
    "roles": [
      "uma_authorization",
      "user"
    ]
  },
  "resource_access": {
    "testclient": {
      "roles": [
        "tuser"
      ]
    },
    "account": {
      "roles": [
        "manage-account",
        "manage-account-links",
        "view-profile"
      ]
    }
  },
  "name": "Darko Luketic",
  "preferred_username": "testuser",
  "given_name": "Darko",
  "family_name": "Luketic",
  "email": "obfuscated@email"
}

    const claims = this.oAuthService.getIdentityClaims();
    if (claims) {
      console.log(claims);
    }

acr:"1"
at_hash:"I1gMIYvaTBxyxlgFuhIAxA"
aud:"public"
auth_time:1504871926
azp:"public"
email:"obfuscated@email"
exp:1504872826
family_name:"Luketic"
given_name:"Darko"
iat:1504871926
iss:"https://connect.icod.de/auth/realms/testrealm"
jti:"32c3d725-dc32-4c35-8aae-4a29ca5a0f3c"
name:"Darko Luketic"
nbf:0
nonce:"Nhya8ekal9yulmktNEVzCKaIuSXlbtd4GwLvYybD"
preferred_username:"testuser"
session_state:"890da13e-4861-48cf-b378-6bd095cc6926"
sub:"f31f2d42-df88-4113-adcb-f5cebfca5dfa"
typ:"ID"

expected:
account, resource_access, realm_access
how would I know in my client app which roles are granted to the subject when I can't read the roles etc, only the default claims? Of course ultimately security is at the resource endpoint but some conditional rendering based on role in the client would be nice to have, if not essential.

getIdentityClaims does only return the claims from the id_token. The access_token is transparent for the client. That means, it can be anything as long as the resource server can read it. In the mentioned case its a JWT but in other cases it could be a encrypted string or just a id.
Is there a way for you to put the information you need into the id_token or to load it on demand by querying the user profile endpoint? For the later approach, you could use the method loadUserProfile().
If this does not work, we could think about a convenice method that parses the access_token in case it is JWT. As this does not align with the specs, we would be in a gray zone with this solution. That's why I would prefer an other option.

Ah right, of course, how dumb of me. access_token can be anything.
Hmmmm
https://stackoverflow.com/questions/39792385/keycloak-openid-connect-userinfo
"if you have Client Secret key, then You can get the user role info by passing that secret key."
because right now that info isn't available with the implicit flow and no secret. but since I know the access_token provides that info ( and you only receive an access token with valid credentials ) I need to parse the access token. And I'd be locked to keycloak, not sure if other IDPs do it the same way, which is not a big deal but still.
I could use (resource owner) password flow but 'sigh' I guess I need a login/register/sso component anyway. I was hoping to avoid that. Does silent-refresh work with password flow?
Alright then, Manfred, I owe you a beer or wine. If you're ever near Opatija/Rijeka in Croatia or Göppingen (east of Stuttgart) in Germany, let me know (open an issue somewhere on my repos)
Best, Darko

I believe token introspection, or simpler, jwt decoding, should be available to the developer by this library since it already does that. I wouldn't make sense adding jsrsasign as an extra dependency.
It would be great if http://kjur.github.io/jsjws/api/ could be wrapped and also exported.
Or some kind of ClaimsFromJWT(jwt: string)
I'm still fresh in the world of typescript and Angular4 or I would do it.

Ok, fine. I schedule it for the next version.

Has there been any progress on this one?

Hi, any progress on this feature?

This issue makes this library pointless with keycloak...

authors: RomainWilbert btmadison dalu khaled-ansary manfredsteyer

license: mit


text:
About Us page

Revamp the About Us page and make it more user interactive and visually appealing .
the image rendering is very slow.

Another contributor is working on About Us page. Please focus on other issues for now.

authors: ShreyaSnehal maniyaom

repo: maniyaom/Movie-Ticket-Booking


text:
Uptime charts

Guess that this will be a heavy task. It'd be really cool to provide uptime charts for the Albion Online server. The data is available (but quite irregular, ~ 1 data point per minute).

You already working on this? If not, I could look into implementing something.

Feel free to do so @datatypevoid ☺
I'm currently thinking about how to solve a bot issue and several other things for the future :)

I'll branch and whip up some charts with Vue and d3, in the meantime, are we talking only showing uptime charts for the time the page has been active, or throwing together a small server--Node perhaps?--for tracking the data? Existing API that I am unaware of maybe? Just want to make sure we are on the same page, rather than ninjaing code together in silence.

There is already an API that gives you statuses from a given time on. Check the microservice for that :)

We can use all data that the API is giving us, but something like a 24h chart would be the best I guess.

You have been busy, nice work!

Well, I just thought a little bit (really just a little) ahead :)
d3 and Vue sounds good. I'm looking forward to it ☺

@datatypevoid Any updates on it? 😃

Works so far

authors: datatypevoid manniL

repo: manniL/albionstatus-website


text:
Mocks sometimes return negative correlation functions

Seems to go away when I disable LINK_IN_RA and LINK_IN_DEC (so only LINK_IN_CZ) is enabled. Haven't figure out what causes it. Quite possibly the same bug as https://github.com/astropy/halotools/issues/218
HT @duncandc - I had forgotten that this issue needed to be fixed.

I have not seen this again. Since DDrppi_mocks does not use LINK_IN_DEC and LINK_IN_RA anymore, I suspect this issue has gone away (I have also not seen this negative correlation function for clustered data).

repo: manodeep/Corrfunc


text:
chore: migrate obsolete workflow set-output to environment files

More info: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

👍🏻

source: gharchive/pull-request

repo: manoldonev/solid-todo-app-ts


text:
[Bug]: FIX THE OVER WRITE ISSUE

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?

its in multiple pages
Add Screenshots
No response
What browsers are you seeing the problem on?
Firefox, Chrome
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC contributor
[X] I want to work on this issue
[X] I'm willing to provide further clarification or assistance if needed.

assigned already


text:
Update to Astro 4, mdx 2, and DaisyUI 4

Updating my site fork to these appears to have no real issues, but always nice to have upstream take a look too.
https://astro.build/blog/astro-4/
https://daisyui.com/docs/changelog/
https://github.com/withastro/astro/blob/main/packages/integrations/mdx/CHANGELOG.md

I don't see any braking changes. Looks good 👌

Done!

authors: WingofaGriffin manuelernestog

repo: manuelernestog/astrofy


text:
New docker-compose file

Everything served from the same url, can be more convenient and does not have CORS issues.
cc @NicolasCARPi @JamesBagley
Still not completely finished, but should be soon.

Hello Manu.
I think you're taking the wrong approach here. Adding a reverse proxy in front of your services doesn't make it a single service, it makes it a three parts service.
On of this part is traeffik which I personally do not want to use because it requires mounting the docker socket, which is widely regarded as a dangerous move (who has access to the docker socket can basically be root on the host). (see https://github.com/traefik/traefik/issues/4174)
Reverse proxy configuration must not be the concern of an app. You should ideally expose a single http endpoint: the frontend, and possibly have a second container on another network (a network internal to syc) so they can communicate.
Ideally, you only have one container exposing one http service on one port. Did you explore simply adding the react part to the python part (or the other way around). Maybe there is a threshold to cross, after which this change will very much simplify a lot of aspects. Maybe not, you know your app best, you tell me.
Here you're adding another big dependency to your project, traeffik, which is definitely something that doesn't belong in the distribution of a webapp. The command argument insecure=true should make you tick ;)
What we want is a container running as non-root user, on unprivileged port, which is what you have already. It's just that you have two, and that is not great, not terrible.
The CORS issues can be worked around, it's just a matter of configuring the server response headers on an OPTIONS http request.

ughh I guess you are right... A shame because it took me a while to figure out the traeffik thing, but it makes sense. I will probably just serve the frontend from the backend, that's probably the easiest.

Given that you have nginx already running on the frontend, you can probably use it as a reverse proxy for a special endpoint (/backend) that will redirect to the other container. This way the frontend doesn't need to know about the backend, it just calls the /backend URL on the same address than the frontend.

I changed it so that the frontend can be served from the fastapi endpoint. Maybe this was a bit an act of stubbornness just because I had set myself to make it work from a single url.
On the other hand, now you can specify the backend url when you run the frontend container instead of when you build the image, and moving forward other config should be possible to be set similarly, and not rely on env variables.
I will update how the CORS are handled soon and document the change.

It's working when I build it in a codespace now, I'm also wondering if this would fix the firewall issue I was having with the hosted (shareyourcloning.org) version as well, the issue previously was just with https://shareyourcloning.api.genestorian.org.

when you build the image,[...], and not rely on env variables.

Configuration should only happen with env vars unless it's really not possible and you have to rely on building the image yourself, but that's really not something anyone wants to do, unless they are trying specific things. You must not require the end users to actually clone your repos and build the images themselves, it complicates deployments for no good reasons.
For instance, for elabftw/elabimg, you can use a build_arg to set the tag or branch of elabftw that will be imported. But end users are never expected to do so, they just use the tagged public image, and all configuration is done at runtime through env.
I'd recommend having a docker-entrypoint.sh as ENTRYPOINT in your image. This script will pick up env var and do some config adjustments before starting the real service.
See https://www.12factor.net/config for reference.
And https://github.com/elabftw/elabimg/blob/master/src/init/prepare.sh for an example of such script. Or https://github.com/docker-library/mysql/blob/master/8.0/docker-entrypoint.sh for another example present in a major service.

Well, if you managed to get everything running into one container, just drop the possibility to run it as two container. There is no need for the added complexity and maintenance for this. The next step is to make the config.json disappear in favor of env vars. Especially given that it seems to only contain one key with one value. Just simplify it, drop the need for a config.json, drop the possibility to use separate containers. You'll thank yourself later to keep it simple (https://www.interaction-design.org/literature/topics/keep-it-simple-stupid).
Honestly, this is much better than before, you went from having 3 containers with an exposed docker socket, to just one container with a very clean dockerfile :clap:

authors: JamesBagley NicolasCARPi manulera

repo: manulera/ShareYourCloning


text:
[WIP] Doc Updates

Context
The current documentation hasn't been re-run for a while and still references functions that don't exist/have been refactored - #132 , https://github.com/mapbox/carmen-cache/pull/135. This PR updates API.md to reflect the current state of master.
Next Actions

[ ] Review
[ ] Merge

cc @Nmargolis, @apendleton, @miccolis

This contains wrong information which we're not going to update because of work that's moving to replace this project in https://github.com/mapbox/carmen-core

repo: mapbox/carmen-cache


text:
The build script isn't overwriting the index.html file

In my experience so far, the build script is not overwriting the index.html file after its first run (so, the first run does overwrite the index.html file).
I think the cause is that the render.js file is looking to specifically overwrite the instance of APP in the index.html file. The problem seems to be that the first run of the build script replaces APP with the compiled contents of the markdown files, so subsequent attempts to replace APP can't succeed.
I've gotten around this by changing the build script to output to a different file:
"build": "NODE_ENV=production browserify src/index.js | uglifyjs -c -m > bundle.js && npm run prerender -- release.html"

I can't really rationalize why that works, though, since the release.html file doesn't include APP either.
¯\_(ツ)_/¯
Assuming I'm not just doing something/everything wrong, can I provide any more information or run any particular tests to help you with this?

This needs some better description! Specifically I need to figure out how to better explain this and make it runnable for everyone.

The gist is that, for the Mapbox use case, the build script only runs in the build phase. We have a service that works a lot like GitHub Pages but it also runs npm install & npm run build - so for a bunch of projects, we use npm scripts to do our build processes and avoid commiting any 'dist' or built files to the repository. So the APP hack is geared for that and is the simplest possible solution.
I think writing a re-runnable script is possible by replacing the APP string-replace with, for instance, <!-- start --> and end comments that wouldn't be overwritten by the rendering process.

authors: JamesChevalier tmcw

repo: mapbox/docbox

license: ISC


text:
Issue-180 Create Tabs component using radix tabs

This PR deletes tab-list component for the following reasons:

not possible to take advantage of the radix tabs out of the box functionality (such as key bindings) if we need to keep the functionality of rendering popover for mobile tabs
from the audit we discovered that tab-list was not used anywhere

This PR replaces underline-tabs component with tabs. Almost all the functionality underline-tabs was migrated to radix, with a few exceptions:

tabs don't support links - unfortunately I discovered that the key bindings do not work if we don't allow radix to create it's own buttons (radix will create buttons for the tabs if asChild is not present in the trigger). I also think that if links are involved then those should be something like "navigation" component and not tabs. I don't really see a place where navigation and section tabs would be used in the same component
some prop names were changed just to avoid using confusing names
possibility to add tab content that is automatically rendered with the active tab has been added to the component
due to the way radix works I had to add a prop called themeTabsContainer that renders special css classes around the tab triggers and doesn't affect the content

Radix tabs supports out of the box functionality for switching tabs, unfortunately due to the way mr-ui is implemented at the moment I couldn't add this. mr-ui doesn't include any css of its own atm, the css comes from assembly package.
In order to support more radix functionality I think mr-ui should have some css of it's own, however this seems like a bigger change to the way we work and so would need to discuss with the whole team.
Other props that radix supports for tabs weren't added because our current css wasn't supporting it.

When you hovering over the space between two tabs, there is no tab is highlighted. However, when you click the empty space, the later tab is activated.
For the original underline-tabs component, the empty space is not clickable. For the example on the Radix website, when you hovering on the empty space, the according tab would be highlighted. Both of above experience are better than current implementation from my point of view.
https://user-images.githubusercontent.com/9078950/180781948-c553a046-797e-4b9b-afbd-d3c77f191e83.mp4

Leaving a note to also address https://github.com/mapbox/mr-ui/issues/116 as part of this PR.

authors: badiuoanaalexandra miafan23 tristen

repo: mapbox/mr-ui


text:
Compile Error

This happend while I did npm install
make: *** [node_sqlite3.target.mk:115: Release/obj.target/node_sqlite3/src/database.o] Error 1
make: Leaving directory '/home/andrew/Documents/AleeBot/node_modules/sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
gyp ERR! System Linux 4.16.7-1-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/andrew/Documents/AleeBot/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/home/andrew/Documents/AleeBot/node_modules/sqlite3/lib/binding/node-v64-linux-x64"
gyp ERR! cwd /home/andrew/Documents/AleeBot/node_modules/sqlite3
gyp ERR! node -v v10.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/andrew/Documents/AleeBot/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/andrew/Documents/AleeBot/node_modules/sqlite3/lib/binding/node-v64-linux-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess. (/home/andrew/Documents/AleeBot/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:957:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:246:5)
node-pre-gyp ERR! System Linux 4.16.7-1-ARCH
node-pre-gyp ERR! command "/usr/bin/node" "/home/andrew/Documents/AleeBot/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/andrew/Documents/AleeBot/node_modules/sqlite3
node-pre-gyp ERR! node -v v10.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.38
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/andrew/Documents/AleeBot/node_modules/sqlite3/lib/binding/node-v64-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/home/andrew/Documents/AleeBot/node_modules/sqlite3/lib/binding/node-v64-linux-x64' (1)

Try npm install sqlite3 --build-from-source.

The v4.0.1 release now has support for node v10 https://github.com/mapbox/node-sqlite3/blob/master/CHANGELOG.md#401

authors: Alee14 Nostradamos springmeyer


text:
Is there any way to create a text file with all links in the open directory?

Is there anyway to auto create a txt file on the open directory that would contain every url on the open directory?
For instance:
https://test.test.workers.dev/test.txt
would contain:
https://test.test.workers.dev/friend.avi
https://test.test.workers.dev/filestream.exe
https://test.test.workers.dev/youtube/hello.mp4
https://test.test.workers.dev/youtube/HDvid.mp4
https://test.test.workers.dev/youtube/Myeyes.mp4
https://test.test.workers.dev/music/mp3/aaron_carter.mp3
https://test.test.workers.dev/music/mp3/backstreetboys.mp3

You can program against Google Drive api yourself.


text:
URL with @ symbol

Issue discussed at mailing list.
@ is the separator for username and password. But if @ is not separator but part of the path, e.g.:
http://localhost/tiles/%(tms_path)s/whatever@2x.png

then the following workaround can be applied:
http://localhost/tiles/%(tms_path)s/whatever%%402x.png

I think this use case worths to be added to the docs.

This is a good workaround but it doesn't work with Open Map Tile server - it doesn't seem to be able to decode %40 as @, so I had to come up with an alternative.
Now I take it this is still up for grabs - and I'm not a good Python coder, otherwise would write a proper patch -, so here're the root cause:
mapproxy/mapproxy/client/http.py:244
head, url = url.rsplit('@', 1)
The authentication bit just applies to the domain section, so anything to the right of the first single slash can be ignored in this context - so my suggestion is to isolate that first and then extract the credentials.
My quick workaround (hack) was just to replace rsplit with split so the substitution happens on the first @ and then I put a leading @ in the source url:
http://@localhost/tiles/%(tms_path)s/whatever@2x.png
and that did the trick

@drnextgis Did you solve it any other tricks without changing the code????

authors: drnextgis toton6868 ycomet

repo: mapproxy/mapproxy


text:
iOS: Custom Markers not showing on Master

Hi,
I've been using the Plugin for a few months now and use it to display different locations through custom image markers. Since i'm working on upgrading my project to cordova ios > 4.x, i've switched to master. Unfortunately the markers are not showing any more, although the success callback is being called on the addMarker() function. Could this be a bug or did you change the API recently or something?
Fwiw, when changing back to my old cordova version (5.4.1) and cordova-ios version (3.9.1), the markers were not showing as well with the master version.
Also, do you have any idea when you'll release a stable 1.4.0 version?
Thanks a lot!

I think there is still remaining the old plugin.
Please remove the old version completely before install the master version.

Okay, so I went ahead and compared the master version to the 1.3.9 release. I saw you changed a lot in the Marker.m class, especially concerning the visible flag.
I was able to get regular markers (not the custom images) to show by re-adding the following lines in line 29:
if ([[json valueForKey:@"visible"] boolValue] == true) {         marker.map = self.mapCtrl.map;     }

Please provide example js code that reproduce your issue.

Btw, android is showing the markers and behaving normally.
I'm using the following code in the js side (I cannot give you a full example because i'm working on a productive app):
div = document.getElementById('map_canvas');

map = googleMaps.Map.getMap(div, {
          'backgroundColor': 'white',
          'mapType': googleMaps.MapTypeId.ROADMAP,
          'controls': {
            'compass': true,
            'myLocationButton': true,
            'indoorPicker': false,
            'zoom': false
          },
          'gestures': {
            'scroll': true,
            'tilt': false,
            'rotate': true,
            'zoom': true
          },
          'camera': {
            'latLng': new googleMaps.LatLng(46.801111, 8.226667),
            'zoom': 8,
          }
        });

      map.addMarker({
        position: new googleMaps.LatLng(
          46.801111,
           8.226667
        ),
        icon: {
          url: 'www/assets/images/map_marker.png',
          size: { width: 20, height: 20 },
          anchor:  [10, 10],
        },
        zIndex: 1

I did some debugging and found out, that the custom icon is not found in the filesystem. This is probably closely related to the changes in cordova-ios4... when i remove the custom icon, it correctly displays the default icons.

Whaiting for the fix :+1:  ty man!

@beastmike1 what cordova/cordova-ios/ios versions did you get this bug on?

I'm using ionic, and that are my versions:
$ ionic info
Your system information:
Cordova CLI: 6.1.1
Ionic Version: 1.2.4-nightly-1917
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.6
ios-sim version: 5.0.3
OS: Mac OS X El Capitan
Node Version: v4.2.2
Xcode version: Xcode 7.3 Build version 7D175
$ cordova platform
Installed platforms:
ios 4.1.1
$ cordova plugin ls
(among other)
com.googlemaps.ios 1.13.0 "Google Map iOS SDK for Cordova"
cordova-plugin-googlemaps 1.3.9 "phonegap-googlemaps-plugin"

thanks. I'll do the PR later today

https://github.com/mapsplugin/cordova-plugin-googlemaps/pull/956

I did changed the changes on the PR and it didn't worked but then I realized than there was more changes between my file Marker.m and the one from the PR and then I replaced the whole file and it worked at the first try. Thank you very much @Alex-Sessler

IS this fixed? Im having the same issue using master...

You can either manually apply the changes of my PR to your local repo or ask the developers to merge my PR into master

=S is fixed???? XP

Same issue here. Will you merge the PR?

It looks like there is a similar bug on Android. Custom icons aren't displayed (classic red icons appear instead).

any updates on the issue?

???

@arielgelbard Make sure you have not space in App name, this cause the same problem (file not found according to XCode console with map.setDebuggable(true).

That worked, thanks! the next question now is how can I have custom markers for iOS with the app name having spaces? Can we tell Apple to patch this?

That worked, thanks! Found a plugin that allows spaces for the app name visually https://github.com/blakgeek/cordova-plugin-app-name

@arielgelbard Nice, plugin-app-name works well 🎆

Can anyone please help me. i m facing the same issue. custom marker is not showing

Enable debuggable mode as mentioned above and check the XCode console for errors.

@Krishna25Vrinsoft Try to check the url on your marker image file. This is stupid, but I forgot the "www/".

The plugin v2-beta version does not need to "www/" anymore.
And relative path is available.
The v1.x will be shutdown in the near future. Please start to use v2-beta version.

Hi,
Have you a change log for the v2?
Thx

Check the wiki @blckshrk :
https://github.com/mapsplugin/cordova-plugin-googlemaps/wiki/v2-beta

repo: mapsplugin/cordova-plugin-googlemaps


text:
Update pgm_Localizable_ar.json

correct some sentences

Thank you for sending your pull request.
Unfortunately I can not read Arabic at all, I asked to review who translated these messages originally.
Please wait for a while.

From the original translator:

Yes this pull request is correct
It includes some better phrases
Thanks

Thank you for your pull request.

it's my pleasure ^_^


text:
KeyError: u'wrapper_class'

Since upgrade to 1.5.1 I have been getting a KeyError: u'wrapper_class' under two circumstance.

If I delete a form field without also deleting the corresponding layout field.  For instance:

class MyForm(forms.From):
    my_field = forms.CharField()

    helper = FormHelper()
    helper.form_tag = False
    helper.layout = Layout(
        Field('my_field'),
    )

    def __init__(self, *args, **kwargs):
        if some_condition:
            self.fields.pop('my_field')
            # Must add the following line or you will get KeyError: u'wrapper_class'
            self.helper.layout.pop(0)

It can be a pain to find the exact field to pop in a more complex form (sometimes will look like this self.helper.layout[1][2][1].pop(2).  When changing the form layout it is easy to forget that you need to update the indexes of the layout field that you are deleting.  This is not a deal breaker but is a regression form 1.4.x.   At least there is a way to work around it :)

The second circumstance is more sinister and is proving extremely difficult to pin down.   If you have a multiple crispy forms on the same page:

<form>
    {% crispy form1 %}
    {% crispy form2 %}
</form>

You will occasionally and seemingly randomly get KeyError: u'wrapper_class' in production (have not seen it while running the local dev server).  These are regular forms created in the view's context - no fields have been manually deleted as in the above example.  Restarting the gunicorn and memcached seems to temporarily "fix" the problem.  I know this will be difficult to track down given my inability to consistently reproduce the issue but I was hoping somebody else may have come across this.
Stack trace:
KeyError: u'wrapper_class'
  File "django/core/handlers/base.py", line 164, in get_response
    response = response.render()
  File "django/template/response.py", line 158, in render
    self.content = self.rendered_content
  File "django/template/response.py", line 135, in rendered_content
    content = template.render(context, self._request)
  File "django/template/backends/django.py", line 74, in render
    return self.template.render(context)
  File "django/template/base.py", line 209, in render
    return self._render(context)
  File "newrelic/api/function_trace.py", line 98, in dynamic_wrapper
    return wrapped(*args, **kwargs)
  File "django/template/base.py", line 201, in _render
    return self.nodelist.render(context)
  File "django/template/base.py", line 903, in render
    bit = self.render_node(node, context)
  File "django/template/base.py", line 917, in render_node
    return node.render(context)
  File "django/template/loader_tags.py", line 135, in render
    return compiled_parent._render(context)
  File "newrelic/api/function_trace.py", line 98, in dynamic_wrapper
    return wrapped(*args, **kwargs)
  File "django/template/base.py", line 201, in _render
    return self.nodelist.render(context)
  File "django/template/base.py", line 903, in render
    bit = self.render_node(node, context)
  File "django/template/base.py", line 917, in render_node
    return node.render(context)
  File "django/template/loader_tags.py", line 135, in render
    return compiled_parent._render(context)
  File "newrelic/api/function_trace.py", line 98, in dynamic_wrapper
    return wrapped(*args, **kwargs)
  File "django/template/base.py", line 201, in _render
    return self.nodelist.render(context)
  File "django/template/base.py", line 903, in render
    bit = self.render_node(node, context)
  File "django/template/base.py", line 917, in render_node
    return node.render(context)
  File "django/template/loader_tags.py", line 135, in render
    return compiled_parent._render(context)
  File "newrelic/api/function_trace.py", line 98, in dynamic_wrapper
    return wrapped(*args, **kwargs)
  File "django/template/base.py", line 201, in _render
    return self.nodelist.render(context)
  File "django/template/base.py", line 903, in render
    bit = self.render_node(node, context)
  File "django/template/base.py", line 917, in render_node
    return node.render(context)
  File "django/template/loader_tags.py", line 135, in render
    return compiled_parent._render(context)
  File "django/template/base.py", line 917, in render_node
    return node.render(context)
  File "django/template/defaulttags.py", line 329, in render
    return nodelist.render(context)
.. frames 26 until 41 were omitted and not available ..
  File "django/template/base.py", line 903, in render
    bit = self.render_node(node, context)
  File "django/template/base.py", line 917, in render_node
    return node.render(context)
  File "crispy_forms/templatetags/crispy_forms_tags.py", line 212, in render
    c = self.get_render(context)
  File "crispy_forms/templatetags/crispy_forms_tags.py", line 132, in get_render
    actual_form.form_html = helper.render_layout(actual_form, node_context, template_pack=self.template_pack)
  File "crispy_forms/helper.py", line 293, in render_layout
    template_pack=template_pack
  File "crispy_forms/layout.py", line 138, in render
    return self.get_rendered_fields(form, form_style, context, template_pack, **kwargs)
  File "crispy_forms/layout.py", line 102, in get_rendered_fields
    for field in self.fields
  File "crispy_forms/layout.py", line 102, in <genexpr>
    for field in self.fields
  File "crispy_forms/utils.py", line 72, in render_field
    form, form_style, context, template_pack=template_pack,
  File "crispy_forms/layout.py", line 357, in render
    fields = self.get_rendered_fields(form, form_style, context, template_pack, **kwargs)
  File "crispy_forms/layout.py", line 102, in get_rendered_fields
    for field in self.fields
  File "crispy_forms/layout.py", line 102, in <genexpr>
    for field in self.fields
  File "crispy_forms/utils.py", line 72, in render_field
    form, form_style, context, template_pack=template_pack,
  File "crispy_forms/layout.py", line 357, in render
    fields = self.get_rendered_fields(form, form_style, context, template_pack, **kwargs)
  File "crispy_forms/layout.py", line 102, in get_rendered_fields
    for field in self.fields
  File "crispy_forms/layout.py", line 102, in <genexpr>
    for field in self.fields
  File "crispy_forms/utils.py", line 72, in render_field
    form, form_style, context, template_pack=template_pack,
  File "crispy_forms/layout.py", line 442, in render
    **kwargs
  File "crispy_forms/layout.py", line 102, in get_rendered_fields
    for field in self.fields
  File "crispy_forms/layout.py", line 102, in <genexpr>
    for field in self.fields
  File "crispy_forms/utils.py", line 159, in render_field
    return html
  File "crispy_forms/base.py", line 22, in __exit__
    del self.context[key]
  File "django/template/context.py", line 75, in __delitem__
    del self.dicts[-1][key]

As a workaround perhaps we could check if the key exists before deleting it?

HI @samkuehn — Thanks for the detailed report. Sorry for your pain!
Some questions:

Could you try using git bisect to find the commit where this snuck in?
Is it only ever the wrapper_class Key that's missing?

You will occasionally and seemingly randomly...

Argh! :-)

It looks like the bug was introduced here: cad080ec41f870734e3e01c58f7a13d156db7b1a. I was only able to test it under scenario 1 above (deleting form field w/out also deleting layout field).  Hopefully fixing this will fix scenario 2 as well.
Yes it is only ever the wrapper_class

Good work thanks.

As a workaround perhaps we could check if the key exists before deleting it?

Looks like that's what used to happen. I'm curious about the Python 3.3 compatibility remark there.
OK. For mega bonus points (and a merge + release first thing) do you fancy opening a PR resolving this? (I would say just revert — but I'm guessing something will fail when you do that...)

Fixed in 1.5.2 (available on PyPI now)

authors: carltongibson samkuehn

repo: maraujop/django-crispy-forms


text:
TypeError: undefined is not an object (evaluating 'args.length')

phantomjs yslow.js --help
TypeError: undefined is not an object (evaluating 'args.length')
yslow.js:5 in global code
^C
phantomjs -v
2.0.0

 system = require('system'),     args = system.args,
instead of
phantom.args

@Codtankist could you please give a usage example for this?

@cdolek I don't know if you still need this but I got it working and maybe this will help other people.
Taken from the top of my yslow.js file:
`/**

Copyright (c) 2012, Yahoo! Inc.  All rights reserved.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var i, arg, page, urlCount, viewport, webpage = require("webpage"),
system = require('system'),
args = system.args,
len = args.length,
urls = [],`

You have to insert the line that starts with system = require('system') and change the line args = phantom.args to args = system.args
Might be worth noting this is for phantomjs 2.1.1

works with 2.1
thanks

Thanks!

On Sep 30, 2016, at 6:56 PM, Adam Lund notifications@github.com wrote:
@cdolek I don't know if you still need this but I got it working and maybe this will help other people.
Taken from the top of my yslow.js file:
`/**
Copyright (c) 2012, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var i, arg, page, urlCount, viewport, webpage = require("webpage"), system = require('system'), args = system.args, len = args.length, urls = [],`
You have to insert the line that starts with system = require('system') and change the line args = phantom.args to args = system.args
Might be worth noting this is for phantomjs 2.1.1
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi
i have follow the changes above, but i got FAIL to load undefined with / without https. but with http, i got output

authors: Codtankist cdolek juniorriau outwitevil spagu

repo: marcelduran/yslow


text:
Add Keycloak user UUID to request object

Hi,
I know it is slightly out of the scope of this library, but since the information is already there, I think it could be useful to include the Keycloak user UUID in the request object along with the roles. The information is available in the 'sub' attribute of the decoded token.
I can make a PR if you're interested.

@olhybrius
I see, man.
So... what is this useful for?
Could you give some examples for this new funcionality?
Thanks!

@olhybrius
I see, man.
So... what is this useful for?
Could you give some examples for this new funcionality?
Thanks!

Well, in my own case, I have to manage, not only the access, but also the ownership of the resource so I can filter the queryset of the viewset based on the Keycloak user UUID found in the token. In other word, only the owner of the resource can see it.
Again, I know this is slightly out of the scope of this library, but the information is already there, so might as well include it.

Well, in my own case, I have to manage, not only the access, but also the ownership of the resource so I can filter the queryset of the viewset based on the Keycloak user UUID found in the token. In other word, only the owner of the resource can see it.
Again, I know this is slightly out of the scope of this library, but the information is already there, so might as well include it.

@olhybrius sorry about my delay!
I'm in a rush with other things. I can't keep attention to these issues.
That's could be interesting and simple.
If you wanna implement this PR, feel free.
As I've said, I wanna keep this lib the most simply possible.
Thanks for contributing!


text:
🛑 Video Call is down

In 8a72ab1, Video Call (https://jitsi01.diversolatam.com/test) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Video Call is back up in da8fc27.

repo: marcoadasilvaa/health


text:
🛑 Video Call is down

In 71d26f9, Video Call (https://jitsi01.diversolatam.com/test) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Video Call is back up in 6ffc3fe.


text:
🛑 Web Patient is down

In c12afab, Web Patient (https://www.sanna.pe/citas/) was down:

HTTP code: 403
Response time: 23 ms

Resolved: Web Patient is back up in 664af65 after 5 minutes.


text:
2d graphics get pixel

As many of you may be aware, qbasic has 2d graphics capability.
Having taught myself python, at least some aspects of the language,
I now use a python graphics library; plotly. I'm also learning vedo.
Now I've encountered an instance where  I need to get information about a
point [pixel] from a graph I've drawn to a window. QBasic has such,  plotly
doesn't,  tkinter  may  as may vedo.
How might I get the colour of a pixel using vedo.

Cool feature to implement. Try:
pip install -U git+https://github.com/marcomusy/vedo.git
then pressing I (shift-i) anywhere in the rendering window will give you the RGB color under the mouse:

How might I implement this as a command from within a python script.
Having drawn a line and then attempting to find a pixel RGBA or colour value on that line using something like c=get_pixel(x,y). Potentially x,y might not be
integer values.

try
import vtk
from vtk.util.numpy_support import vtk_to_numpy
import vedo

def myfnc(key):
      x, y = plt.interactor.GetEventPosition()
      w2if = vtk.vtkWindowToImageFilter()
      w2if.SetInput(plt.window)
      w2if.ReadFrontBufferOff()
      w2if.Update()
      nx, ny = plt.window.GetSize()
      arr = vtk_to_numpy(w2if.GetOutput().GetPointData().GetScalars())
      arr = arr.reshape(ny,nx,3)
      print('Pixel =', [x,y], ' RGB =', arr[y,x].tolist())
      return arr[y,x]

plt = vedo.Plotter(axes=1)
plt.keyPressFunction = myfnc
s = vedo.Sphere()
s.cmap('jet', s.points()[:,1])
plt.show(s)

authors: edmontz marcomusy

repo: marcomusy/vedo


text:
works incorrectly after a while

Hi!
It works fine, but after a while I see my accessories state corectly if I turn the lamps manually on or off, but if I turn the lights off and on from the phone, their status changes only on the phone, the real device does not turn on or off.
After homebridge restart it works again for a while.
Any suggestion?
Thanks

What plugins are you using?

I used homebridge-loxone-ws plugin.
With IOS 11 it looks like it does not work.

Make sure Bonjour is running correctly and you're not using IPv6. Does it help? (Got no problems with iOS 11)

authors: marcoraddatz zhooley

repo: marcoraddatz/homebridge-docker


text:
Jpa ratelimiter config prevents entity scan of other jpa entities

I am using Zuul rate limit in my personal spring boot project. In my project, I wanted to load few other configurations from jpa repo. I am using spring data and found that when Zuul rate limit dependencies are included, my other jpa entities are not scanned and found in the application context.
Looking into the code, I found the following configuration
@EntityScan
@Configuration
@EnableJpaRepositories(basePackages = "com.marcosbarbero.cloud.autoconfigure.zuul.ratelimit.config.repository.springdata")
@ConditionalOnMissingBean(RateLimiter.class)
@ConditionalOnProperty(prefix = PREFIX, name = "repository", havingValue = "JPA")
public static class SpringDataConfiguration {
    @Bean
    public RateLimiter springDataRateLimiter(final RateLimiterErrorHandler rateLimiterErrorHandler,
                                             final RateLimiterRepository rateLimiterRepository) {
        return new JpaRateLimiter(rateLimiterErrorHandler, rateLimiterRepository);
    }

}

Here as the EnableJpaRepositories is restricted to a specific folder, can this be an issue with missing the other repository interfaces and entity classes?
Thanks!

To overcome this issue, rather than relying on the autoconfiguration with spring boot, I added EnableJpaRepositories and EntityScan annotations with basepackages pointing to my classes in code.


text:
Fixed english string resources (EN)

Well some of setting description(EN) is written in Chinese instead of English
It seems an easy(?) problem to fix, so did not register an issue.

Thanks for letting me know! Sorry for the silly mistake. The texts were originally in English, so I’ve identified and pushed them to your PR. This fix will be included in the upcoming release.

authors: Acylation YiruJeon

repo: marcusolsson/obsidian-projects


text:
feat: add description to contact

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
I just added a description to contact, according solicitation of client.
Fixes # (issue)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

[x] Test A
[x] Test B

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] Any dependent changes have been merged and published in downstream modules

Ok!!! very good now!!!


text:
WKWebView retainCycle

Please look at the two parts of code
the two  _webViewDelegate are slightly different
@implementation WKWebViewJavascriptBridge {
    WKWebView* _webView;
    id<WKNavigationDelegate> _webViewDelegate;       // <====== this one is not weak
    long _uniqueId;
    WebViewJavascriptBridgeBase *_base;
}

@implementation WebViewJavascriptBridge {
    WVJB_WEAK WVJB_WEBVIEW_TYPE* _webView;
    WVJB_WEAK id _webViewDelegate;  // <============== here is `weak`
    long _uniqueId;
    WebViewJavascriptBridgeBase *_base;
}

any updates？

#243
#247
#225
All there might be the same reason

This is currently fixed in the master branch. If you are using Cocoapods you will have to point to the master rather than using the latest version.

I believe this has been fixed. Please update to latest version and check. Feel free to reopen.

authors: aelam marcuswestin maxcampolo

repo: marcuswestin/WebViewJavascriptBridge


text:
handle database fetch results better

as a developer, I need to handle empty result sets from database query calls better so that the code is less brittle

Tasks

[ ] update findById() queries to handle empty data sets and invalid id arguments
[ ] update find() queries to handle empty data sets and invalid id arguments
[ ] update findOne() queries to handle empty data sets and invalid id arguments

Definition of Done

[ ] all findById() queries handle empty data sets and invalid id arguments
[ ] all find() queries handle empty data sets and invalid id arguments
[ ] all findOne() queries handle empty data sets and invalid id arguments

still valid, doesn't appear to be an issue, but low risk and low priority

Also includes some elements of #56

authors: autoboxer bchiaruttini n-devr

repo: mareinc/mare


text:
Please tag your Releases

Please tag your Releases,so it would be helpful to track version
--
Debian Packaging Team

Hi @vinay-keshava, thank you for reaching out. I haven't technically "released" any version yet on GitHub, but it's a good point to start doing that regardless of package managers.. So, here you go - https://github.com/maricn/interception-vimproved/releases/tag/v0.1.0
Feel free to reopen the issue if you need something else.

@maricn thanks

authors: maricn vinay-keshava

repo: maricn/interception-vimproved


text:
Add .npmignore

Keeps npm installs light by excluding dev files. The big one here is /test, the rest are just for completeness - the install size goes from 2.7M to ~300k.

Ah, I didn't know that the tests had gotten that big. I agree it's a shame to have every library user download them, though I don't see much reason for also stripping out the other non-essential files. I've merged this as 2b6f24e , leaving only test/ in the file.

I like the big tests :smile: but yeah test/ is enough. thanks!

authors: marijnh zertosh

repo: marijnh/acorn


text:
console.*(text) can wait string or object

The console.log, etc can wait text or object argument.

Thanks, merged as ca53c4a

authors: angelozerr marijnh

repo: marijnh/tern


text:
COMMENT ON PARAMETER

Missing name's procedures.

Now Name.

OK, I'll take a look

authors: Jhironsel arvanus

repo: mariuz/flamerobin


text:
Context menu support for editor pane and tree-view plugin

I'm pretty new to coffeescript, so apologies for any faux pas in the code. I've added working support for context menu access to the Open On Bitbucket features.

Wow, coffeescript likes consistency, huh? :) I'll fix these and resubmit.

Sounds great! Thanks for contributing!

authors: mark-adams snazzware

repo: mark-adams/open-on-bitbucket


text:
TypeScript: Deceleration or Migrate

What pain point are you perceiving?.
Even when including @types/marked, including marked-xhtml doesn't support TypeScript.
Describe the solution you'd like
As Marked migrates to TypeScript, so should these new Marked support libraries. As they are small projects and the main project will remove the @types/marked dependency, I would request the migration route to reduce the need to add two packages per package.

@UziTech this can be closed i presume?

Yes, thank you!

authors: TheSeg UziTech baseplate-admin

repo: markedjs/marked-xhtml


text:
Ensure properties file has been written before using it

Close the properties file before trying to read it. This ensures that the file has been written to disk.

Codecov Report

Merging #240 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #240      +/-   ##
==========================================
+ Coverage   89.78%   89.78%   +<.01%
==========================================
  Files          44       44
  Lines        2486     2487       +1
==========================================
+ Hits         2232     2233       +1
  Misses        254      254

Impacted Files
Coverage Δ

lintreview/tools/checkstyle.py
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6338093...9527eb7. Read the comment docs.

authors: codecov-io markstory

repo: markstory/lint-review


text:
Allow current Molcas 21.06 in SHARC 2.1

We haven't updated the Molcas patch in sharc, which allows to use newer versions. This broke Molcas in SHARC. This should again fix it.

Good catch.

authors: markuskowa sheepforce

repo: markuskowa/NixOS-QChem


text:
Datenaufbau "cases/recovered - delta/omnicron"

Zunächst vielen Dank für die Bereitstellung der API.
Mir fiel auf dass die Genesenen unter https://api.corona-zahlen.org/germany/history/recovered  sehr rückläufig sind.
Bsp.
{"recovered":723,"date":"2021-12-20T00:00:00.000Z"}
vs
{"recovered":7503,"date":"2021-05-21T00:00:00.000Z"}
Parallel dazu gibt es bei "Delta" Genesenen unter https://api.corona-zahlen.org/germany , mehr Genesene als Erkrankte.
"delta":{"cases":22214,"deaths":157,"recovered":38546}
Frage:
/germany/history/cases = beinhaltet ALLE Fälle inkl. Delta & Omnicron ?
/germany/history/recovered = beinhaltet KEINE Delta/Omnicron- recovered

Im offiziellen RKI Dashboard werden offensichtlich nur noch die Werte aus "Delta" verwendet?

https://experience.arcgis.com/experience/478220a4c454480e823b17327b2bf1d4/page/Landkreise/
Letzte Frage: Gibt es auch schon die Omnikron Daten? https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Situationsberichte/Omikron-Faelle/Omikron-Faelle.html?__blob=publicationFile
Vielen Dank vorab!

Frohe Weihnachten allen!
in der gesamten API findet KEINE Unterscheidung zwischen den verschiedenen Corona Varianten statt!
das "delta" unter /germany beschreibt nicht die Corona Variante "Delta" sondern den Unterschied zum Vortag! Heute wurden also für gestern 38.546 neu Genesene "angenommen" (siehe hierzu auch die Erklärung des RKI)
Hinweis zu Genesenen Anhand der dem RKI von den Gesundheitsämtern übermittelten Detailinformationen zu einem Erkrankungsfall wird für jeden Fall eine Dauer der Erkrankung geschätzt. Für Fälle, bei denen nur Symptome angegeben sind, die auf einen leichten Erkrankungsverlauf schließen lassen, wird eine Dauer der Erkrankung von 14 Tagen angenommen. Bei hospitalisierten Fällen oder Fällen mit Symptomen, die auf einen schweren Verlauf hindeuten (z. B. Pneumonie) wird eine Dauer der Erkrankung von 28 Tagen angenommen. Ausgehend vom Beginn der Erkrankung, bzw. wenn dieser nicht bekannt ist, vom Meldedatum ergibt sich ein geschätztes Datum der Genesung für jeden Fall. Da im Einzelfall auch deutlich längere Erkrankungsverläufe möglich sind, bzw. die hier genutzten Informationen nicht bei allen Fällen dem RKI übermittelt werden, sind die so berechneten Daten nur grobe Schätzungen für die Anzahl der Genesenen und sollten daher auch nur unter Berücksichtigung dieser Limitationen verwendet werden.
Genesene werden nicht wirklich erfasst sondern anhand der Zeit angenommen.
in der Historie werden diese 38.546 Genesene jedoch nicht alle an einem Tag geführt sondern auf die entsprechenden Tage seit dem Erkrankungsbeginn, sofern bekannt, bzw. auf das Meldedatum verteilt.
Die Historie wird sich also mit der Zeit verändern. Deine blaue Linie wird sich mit der Zeit immer weiter der orangenen Linie nähern, so wie es bis Anfang Dezember schon der Fall ist. Alle history Daten bis auf frozen-Incidence sind dynamische Daten die sich vor allem in den vergangenen 2 Wochen fast täglich ändern! Für die Genesenen gibt es leider keine entsprechende Grafik auf dem Dashboard, aber anhand der Neuen Faälle kann man das dort auch gut sehen:
22.214 neue Fälle (alle Virusvarianten!)
Diese verteilen sich (Stand heute) auf folgende Tage (Erkrankungsdatum, wenn bekannt, bzw. Meldedatum)
heute 14.710

gestern 6.280

vorgestern 925

usw.
Hier nun noch auf welche Tage sich die 38.546 neu Genesenen verteilen (zu den bereits an diesen Tagen genesenen!) (Minus Werte sind korrekturen!):
+-------+------------+
| value | date       |
+-------+------------+
|     1 | 2020-10-13 |
|    -1 | 2020-11-18 |
|     1 | 2020-11-26 |
|     1 | 2020-11-29 |
|     1 | 2020-12-03 |
|     1 | 2020-12-12 |
|     1 | 2020-12-13 |
|     1 | 2020-12-14 |
|    -1 | 2020-12-17 |
|    -1 | 2020-12-28 |
|    -3 | 2020-12-29 |
|    -4 | 2020-12-30 |
|    -1 | 2020-12-31 |
|    -1 | 2021-01-05 |
|    -2 | 2021-01-06 |
|    -2 | 2021-01-07 |
|     0 | 2021-01-08 |
|    -1 | 2021-01-09 |
|     1 | 2021-01-12 |
|     2 | 2021-01-13 |
|    -1 | 2021-01-26 |
|    -1 | 2021-01-29 |
|    -1 | 2021-02-03 |
|    -2 | 2021-03-25 |
|     1 | 2021-04-14 |
|    -1 | 2021-04-29 |
|     1 | 2021-05-03 |
|     1 | 2021-05-17 |
|     1 | 2021-05-26 |
|     1 | 2021-07-14 |
|    -1 | 2021-07-16 |
|    -1 | 2021-08-28 |
|     1 | 2021-09-01 |
|     1 | 2021-09-18 |
|    -1 | 2021-09-24 |
|     1 | 2021-09-26 |
|     1 | 2021-09-28 |
|     1 | 2021-10-04 |
|     1 | 2021-10-08 |
|    -1 | 2021-10-10 |
|     1 | 2021-10-13 |
|     1 | 2021-10-14 |
|     1 | 2021-10-16 |
|    -1 | 2021-10-24 |
|     0 | 2021-10-25 |
|     0 | 2021-10-27 |
|     2 | 2021-10-29 |
|     0 | 2021-10-30 |
|     0 | 2021-10-31 |
|     1 | 2021-11-01 |
|     4 | 2021-11-02 |
|     1 | 2021-11-03 |
|     2 | 2021-11-04 |
|    -2 | 2021-11-05 |
|     1 | 2021-11-06 |
|    -1 | 2021-11-07 |
|     1 | 2021-11-08 |
|     2 | 2021-11-09 |
|     1 | 2021-11-10 |
|    -4 | 2021-11-11 |
|    -2 | 2021-11-12 |
|    -2 | 2021-11-13 |
|     1 | 2021-11-14 |
|     1 | 2021-11-15 |
|    -2 | 2021-11-16 |
|     0 | 2021-11-17 |
|     1 | 2021-11-18 |
|    -2 | 2021-11-19 |
|    -3 | 2021-11-20 |
|     1 | 2021-11-21 |
|     4 | 2021-11-22 |
|     2 | 2021-11-23 |
|     9 | 2021-11-24 |
|    16 | 2021-11-25 |
|    53 | 2021-11-26 |
| 18502 | 2021-11-27 |
|   167 | 2021-11-28 |
|   516 | 2021-11-29 |
|  1109 | 2021-11-30 |
|   865 | 2021-12-01 |
|   499 | 2021-12-02 |
|   300 | 2021-12-03 |
|   147 | 2021-12-04 |
|    82 | 2021-12-05 |
|    88 | 2021-12-06 |
|    90 | 2021-12-07 |
|    98 | 2021-12-08 |
|    83 | 2021-12-09 |
|   140 | 2021-12-10 |
|  8493 | 2021-12-11 |
|   346 | 2021-12-12 |
|   822 | 2021-12-13 |
|  2264 | 2021-12-14 |
|  1865 | 2021-12-15 |
|  1035 | 2021-12-16 |
|   518 | 2021-12-17 |
|   139 | 2021-12-18 |
|    38 | 2021-12-19 |
|    98 | 2021-12-20 |
|    75 | 2021-12-21 |
|    48 | 2021-12-22 |
|    27 | 2021-12-23 |
|    11 | 2021-12-24 |
+-------+------------+

Wünsche natürlich auch frohe Weihnachten.
@Rubber1Duck , vielen Dank das löst den Knoten ;)
Das war wohl ein klassisches Missverständnis, "delta" ist dann als Variablenbezeichnung etwas ungünstig "geworden" :)
Vielen Dank & schöne Feiertage noch 🤝


text:
toOrdinal returns incorrect results for some negative numbers (-11, -12, -13)

I've found the issue with negative numbers:
var numberToWords = require("number-to-words")
console.log(numberToWords.toOrdinal(-11))
console.log(numberToWords.toOrdinal(-12))
console.log(numberToWords.toOrdinal(-13))

returns:
-11st
-12nd
-13rd

Ouch! This needs fixing ASAP, thanks for the report @dmrzn!


text:
[ENHANCEMENT] Automatically use 'best' available device when none (or an invalid one) is specified

Is your feature request related to a problem? Please describe.
When switching Marqo between devices you currently have to be sure you update every piece of code that specifies a device. This is most problematic in the cloud where nodes can be swapped from CPU to GPU and vice versa easily.
Describe the solution you'd like
Similar to how HuggingFace pipelines automatically use a GPU if one is available I'd like Marqo to automatically use the best available device if one is not specified. Additionally, if one is specified but is not available then it should give a warning saying it has defaulted to whichever device was available.
Example Scenarios:

I have a GPU and don't tell Marqo what device I want (either in the cloud or using a container run with --gpus all)

The GPU is detected and used instead of CPU

My system only has a CPU but I ask Marqo to use a GPU

Marqo logs a warning (to the docker console and python client) like Warning: request received with "device='cuda'" however no CUDA compute capable devices were found, Marqo will default to CPU inference.

Describe alternatives you've considered
While I think both scenarios should be catered for, the first one is the most important.
Additional context
If you never specify a device in your code then you should be able to swap between CPU and GPU Marqo setups without having to make any code changes while also getting to use the hardware acceleration when it is available.

Implemented. https://github.com/marqo-ai/marqo/pull/508

authors: OwenPendrighElliott vicilliar

repo: marqo-ai/marqo


text:
"_parse_errors_total" counter and exception for united namespaces

Is your feature request related to a problem? Please describe.
When one of namespaces have errors by some reason (wrong format, not accessible logfile, etc) exporter drop exception like "parse_errors_total was collected previous" (not literally)
Describe the solution you'd like
Do conjuction of parse_errors_total metrics in united namespace and increase metric gauge
Describe alternatives you've considered
Maybe add namespace_label for parse_errors_total metric for possible separate broken namespace configs

I've added every possible test case I can think of into #218, but they all pass successfully. I'm afraid I'll need an exact configuration example to be able to be able to reproduce this error.

Finaly i've got right config for reproduction

authors: martin-helmich xzert


text:
Weird results when training Dixon model

Hi,
I have noticed that there is a dramatic difference in prediction results when training the dixon model with almost the same amount of data.
Traning with the first 99 rows outputs this:
Home Win: 0.4901944888036056
Draw: 0.4236429709276788
Away Win: 0.08616254025982717
But training with the first 100 (it even has a negative probability):
Home Win: 0.37407906289002624
Draw: 0.6979058936975158
Away Win: -0.07198495669064632
I have prepared a small script to demonstrate this:
`
import penaltyblog as pb
fb = pb.scrapers.FootballData("GRC Super League", "2022-2023")
Train with 99
df = fb.get_fixtures().iloc[:99]
print(df)
weight = pb.models.dixon_coles_weights(df["date"], 0.001)
clf = pb.models.DixonColesGoalModel(
df["goals_home"], df["goals_away"], df["team_home"], df["team_away"], weight
)
clf.fit()
print(clf)
print(clf.predict("Olympiakos", "Asteras Tripolis"))
Train with 100
df = fb.get_fixtures().iloc[:100]
print(df)
weight = pb.models.dixon_coles_weights(df["date"], 0.001)
clf = pb.models.DixonColesGoalModel(
df["goals_home"], df["goals_away"], df["team_home"], df["team_away"], weight
)
clf.fit()
print(clf)
print(clf.predict("Olympiakos", "Asteras Tripolis"))
`
I could not find why this happens, could you maybe take a look?
Thanks, Zsolt

Thanks Zsolt - it looks like the optimiser is coming up with a value for rho that is breaking Dixon and Cole's adjustment factor. I suspect it's because you're using quite a small amount of data so the model is not converging well and so the optimiser's output is quite volatile.
Adding in the previous season's data as well helps the model converge better.
df = pd.concat(
    [
        pb.scrapers.FootballData("GRC Super League", "2021-2022").get_fixtures(),
        pb.scrapers.FootballData("GRC Super League", "2022-2023").get_fixtures(),
    ]
)[:-2]

weight = pb.models.dixon_coles_weights(df["date"], 0.001)
clf = pb.models.DixonColesGoalModel(
df["goals_home"], df["goals_away"], df["team_home"], df["team_away"], weight
)
clf.fit()

print(clf)
print(clf.predict("Olympiakos", "Asteras Tripolis"))

df = pd.concat(
    [
        pb.scrapers.FootballData("GRC Super League", "2021-2022").get_fixtures(),
        pb.scrapers.FootballData("GRC Super League", "2022-2023").get_fixtures(),
    ]
)[:-1]

weight = pb.models.dixon_coles_weights(df["date"], 0.001)
clf = pb.models.DixonColesGoalModel(
df["goals_home"], df["goals_away"], df["team_home"], df["team_away"], weight
)
clf.fit()

print(clf)
print(clf.predict("Olympiakos", "Asteras Tripolis"))

I'll look into adding constraints around the value that rho is allowed to be to help minimise this in the future

authors: martineastwood monokizsolt

repo: martineastwood/penaltyblog