Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS error in web.assests_common.js #10377

Closed
japettyjohn opened this issue Jan 8, 2016 · 11 comments
Closed

JS error in web.assests_common.js #10377

japettyjohn opened this issue Jan 8, 2016 · 11 comments

Comments

@japettyjohn
Copy link

I installed odoo 9 with docker today and after it has completed creating the database the home page of /web/ has this JS error:

Uncaught TypeError: Cannot read property 'base' of undefined from web.assets_common.js:2660

I turned on debug_sql and do not see any errors in the log. The database is created and the tables are all there.

@steync027
Copy link

Good day @japettyjohn. Could you go to the URL /web?debug=. By doing this, there won't be a web.assets_common.js, but rather many specific javascript files. That way you will see in which javascript file throws that error.

@nilshamerlinck
Copy link
Contributor

Hi @japettyjohn. Could you find the root cause of the problem using debug mode? Or did it disappear?

@japettyjohn
Copy link
Author

When using debug=. I get a TypeError: openerp._openerp is undefined from https://github.com/odoo/odoo/blob/9.0/addons/web/static/src/js/framework/session.js#L256

@plexorama
Copy link

got the same error. any fix yet?
I've checked the code, it seems openerp._openerp never gets defined anywhere.

Thats a real show-stopper guys!

@habfast
Copy link

habfast commented Mar 6, 2016

Same problem here as well

@paztek
Copy link

paztek commented May 20, 2016

I'm experiencing the same issue.

@dreambits
Copy link

Hello

I am also facing this issue.
I am trying odoo 9 on docker and i tried putting "?debug=" in url

Now browser console is showing

Uncaught TypeError: Cannot read property 'base' of undefined in session.js on Line 256

@gbisheimer
Copy link
Contributor

I had the same issue with a new installation using Docker. I found out that the problem was I haven't created the odoo user in the server. After creating the user and assigning it admin privileges the problem went away.

Hope it helps.

@dungsedv
Copy link

dungsedv commented Sep 4, 2016

Hi,

I also trapped into this Problem when installing Odoo into a docker container.

gbisheimer: can you explain it a little bit more detailed. The default dockerfile will create the odoo user and start the container as user odoo.
Did you mean to add the User to root group?

@tiangolo
Copy link
Contributor

tiangolo commented Oct 3, 2016

I was having the same problem running it with Docker (Docker Compose).

I don't see how it is related, but the problem seemed to be the name of the user in the PostreSQL database.


Steps to reproduce

In the project's directory, Create a file docker-compose.yml containing:

version: '2'
services:
  server:
    image: odoo:9
    links:
      - db:db
    environment:
    - DB_PORT_5432_TCP_ADDR=db
    - DB_PORT_5432_TCP_PORT=5432
    - DB_ENV_POSTGRES_PASSWORD=odoo
    ports:
      - '8069:8069'
  db:
    image: postgres:9.5
    environment:
      - POSTGRES_PASSWORD=odoo

Notice that there is no POSTGRES_USER variable. The PostgreSQL container would use a default name for the user: postgres.

And the "entrypoint" in the Odoo assigns a default user of "postgres" too. So it "should work" (but it doesn't).

Then run:

docker-compose up -d

After it creates the containers, go to http://localhost:8069 or the address of your Docker server in port 8069.

Fill the form to create a database (for example named "database") and a user.

After finishing importing and creating the database, enter the credentials in the login form.

After that, the blank screen with the Odoo logo comes up.


Workaround

In the project's directory, Create a file docker-compose.yml containing:

version: '2'
services:
  server:
    image: odoo:9
    links:
      - db:db
    environment:
    - DB_PORT_5432_TCP_ADDR=db
    - DB_PORT_5432_TCP_PORT=5432
    - DB_ENV_POSTGRES_PASSWORD=odoo
    - DB_ENV_POSTGRES_USER=odoo
    ports:
      - '8069:8069'
  db:
    image: postgres:9.5
    environment:
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo

Notice that there is a POSTGRES_USER variable in the Postgres container and a DB_ENV_POSTGRES_USER variable in the server / Odoo container, both with value "odoo".

Then run:

docker-compose up -d

After it creates the containers, go to http://localhost:8069 or the address of your Docker server in port 8069.

Fill the form to create a database (for example named "database") and a user.

Note:

As the Postgres container creates a DB with the name of the user, in this case "odoo", that database will already exists by the time of initialization. So, as the Postgres user has to be named "odoo" there will be a dabase named "odoo" and if you use that name in the initialization form it will complain that the database already exists. So name it differently, for example "database".

After finishing importing and creating the database, enter the credentials in the login form.

After that, the normal Odoo screen comes up with the apps to be installed.

@pedrobaeza
Copy link
Collaborator

Closing as this should be solved now and there's a workaround any way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants