Giter Site home page Giter Site logo

Comments (23)

stephanegigandet avatar stephanegigandet commented on July 26, 2024 1

@monsieurtanuki the auth.pl cookie is not in prod in .org yet, it will be deployed early this week.

from smooth-app.

monsieurtanuki avatar monsieurtanuki commented on July 26, 2024

@teolemon Probably linked to the fact that the cookie is null.

from smooth-app.

teolemon avatar teolemon commented on July 26, 2024

@stephanegigandet for some reason, the cookie is null.

from smooth-app.

monsieurtanuki avatar monsieurtanuki commented on July 26, 2024

@stephanegigandet We expect the cookie in headers?['set-cookie'] after a call to auth.pl.
Something has changed recently?

from smooth-app.

teolemon avatar teolemon commented on July 26, 2024

it's weird, because I believe nothing has changed server side, this API is superrecent.
@monsieurtanuki did you ever manage to see the new Nutri-Score on products ?

from smooth-app.

monsieurtanuki avatar monsieurtanuki commented on July 26, 2024

it's weird, because I believe nothing has changed server side, this API is superrecent.

Could be a merge issue in off-dart. In my latest PR, I rebuilt the generated files as needed, and found out that the "user" generated file changed, unexpectedly. I'll have a look at it today.

@monsieurtanuki did you ever manage to see the new Nutri-Score on products ?

Never, but as I currently struggle to even run the app due to "macbook/android emulator/api 34" BS I strongly limit my use of the app.

from smooth-app.

monsieurtanuki avatar monsieurtanuki commented on July 26, 2024

@teolemon @stephanegigandet We're supposed to get a "cookie" somewhere, but that's not there.

Response body:

{
  "status":1,
  "status_verbose":"user signed-in",
  "user":{
    "admin":0,
    "country":"",
    "moderator":0,
    "name":"the user name",
    "preferred_language":"en"
  },
  "user_id":"grumpf"
}

Response header:

{
  connection: keep-alive,
  access-control-allow-origin: *,
  transfer-encoding: chunked,
  date: Mon, 06 May 2024 15:40:35 GMT,
  strict-transport-security: max-age=63072000,
  access-control-expose-headers: Content-Length,Content-Range,
  content-type: application/json; charset=utf-8,
  x-xss-protection: 1; mode=block,
  server: nginx/1.18.0,
  x-request-id: 5gj3d4KDRYZYrtyV,
  access-control-allow-headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,If-None-Match,Authorization,
  access-control-allow-methods: HEAD, GET, PATCH, POST, PUT, OPTIONS,
  x-download-options: noopen,
  x-content-type-options: nosniff,nosniff
}

Our input is a POST to cgi/auth.pl, with

  • header: {Accept: application/json, User-Agent: - off-dart integration tests, From: grumpf}
  • body: {body: 1, comment: dart API test, user_id: grumpf, password: ****, app_name: off-dart integration tests}

from smooth-app.

teolemon avatar teolemon commented on July 26, 2024

Discussed yesterday evening with @stephanegigandet , and nothing has changed server side

from smooth-app.

monsieurtanuki avatar monsieurtanuki commented on July 26, 2024

@teolemon I've just had a look at @g123k's related PRs, and the files are 99% untouched:

I've never seen the new nutriscore logos in the app.
Could it be that the cookie feature was only tested on emulators, and not on devices?

from smooth-app.

g123k avatar g123k commented on July 26, 2024

I'm sorry I'm abroad and don't have access to a computer.
But as a reminder, the server was not deployed and switching to DEV was mandatory

from smooth-app.

monsieurtanuki avatar monsieurtanuki commented on July 26, 2024

arigatou g123k san.

from smooth-app.

teolemon avatar teolemon commented on July 26, 2024

@monsieurtanuki @g123k DEV does not improve the shebang: it's already been deployed to .org if you're logged in: https://fr.openfoodfacts.org/produit/4613448779566/chocapic#

from smooth-app.

teolemon avatar teolemon commented on July 26, 2024

image

from smooth-app.

monsieurtanuki avatar monsieurtanuki commented on July 26, 2024

@teolemon @stephanegigandet Regardless of the new nutriscore being deployed in DEV, TEST or PROD, our problem is that cookies are NOT returned by the PROD server through auth.pl.
But they are by the TEST server, something like:
set-cookie: session=user_id&openfoodfacts-dart&user_session&NYF1KHwKQe71Wce7EvcJepGqN9lm1cQJzSP52OcnUj5i4n2hnTm6kHJsN0C4hnkW; domain=.openfoodfacts.net; path=/; SameSite=Lax

So as long as we don't get cookie, we won't send them back, and we won't get new nutriscore depending on the sent cookie.

If it's not a matter of code difference between PROD and TEST, maybe it's a server parameter. Worst case scenario: a server parameter that cannot be set to this value in production.

from smooth-app.

g123k avatar g123k commented on July 26, 2024

It's ok for me after a sign-out/log-in:
Screenshot 2024-05-16 at 10 29 43

Could you confirm this works for you?

from smooth-app.

monsieurtanuki avatar monsieurtanuki commented on July 26, 2024

I don't know if I'm supposed to see it, but anyway I don't see the new formula.

from smooth-app.

g123k avatar g123k commented on July 26, 2024

I don't know if I'm supposed to see it, but anyway I don't see the new formula.

Or maybe, do your account have moderator rights?
(cc @teolemon)

from smooth-app.

teolemon avatar teolemon commented on July 26, 2024

@monsieurtanuki are you using .net, and is your country set to Germany ?

from smooth-app.

teolemon avatar teolemon commented on July 26, 2024

(you are a moderator anyway)

from smooth-app.

teolemon avatar teolemon commented on July 26, 2024

(but @stephanegigandet made the Nutri-Score generally available outside France on .net)

from smooth-app.

monsieurtanuki avatar monsieurtanuki commented on July 26, 2024

I've just tested successfully with .net, Andorra and English:
image

from smooth-app.

g123k avatar g123k commented on July 26, 2024

Ok, so perfect.
So I guess we can close this issue, isn't it?

from smooth-app.

teolemon avatar teolemon commented on July 26, 2024

Indeed

from smooth-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.