{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4645","repository_url":"https://api.github.com/repos/jhipster/generator-jhipster","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4645/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4645/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4645/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/4645","id":194802298,"number":4645,"title":"Cannot log into generated application","user":{"login":"razorvind","id":13865022,"avatar_url":"https://avatars.githubusercontent.com/u/13865022?v=3","gravatar_id":"","url":"https://api.github.com/users/razorvind","html_url":"https://github.com/razorvind","followers_url":"https://api.github.com/users/razorvind/followers","following_url":"https://api.github.com/users/razorvind/following{/other_user}","gists_url":"https://api.github.com/users/razorvind/gists{/gist_id}","starred_url":"https://api.github.com/users/razorvind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razorvind/subscriptions","organizations_url":"https://api.github.com/users/razorvind/orgs","repos_url":"https://api.github.com/users/razorvind/repos","events_url":"https://api.github.com/users/razorvind/events{/privacy}","received_events_url":"https://api.github.com/users/razorvind/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-12-10T23:55:16Z","updated_at":"2016-12-13T10:05:13Z","closed_at":null,"body":"##### **Overview of the issue**\r\nI use jhipster 1.8.5 and jhipster generator 3.12.1\r\nI generated application:\r\n- session based with spring security\r\n- MySQL database\r\n- spring web socket\r\n- all other options by default\r\n- no entities (as I'm interested in the web socket implementation)\r\n\r\nI've create database and user in MySQL as:\r\n`create database wsnew;\r\n\r\nCREATE USER wsnew@'%' IDENTIFIED BY '1111';\r\nGRANT ALL ON wsnew.* TO wsnew@'%';\r\nFLUSH PRIVILEGES;`\r\n\r\nHere is my application-dev.yml config:\r\n`        url: jdbc:mysql://localhost:3306/wsnew?useUnicode=true&characterEncoding=utf8&useSSL=false\r\n        name:\r\n        username: wsnew\r\n        password: 1111`\r\n\r\nHere is the log from IDEA console:\r\n2016-12-11 02:32:04.062 DEBUG 8032 --- [ XNIO-2 task-58] m.m.s.CustomPersistentRememberMeServices : Remember-me cookie detected\r\nHibernate: select persistent0_.series as series1_3_0_, persistent0_.ip_address as ip_addre2_3_0_, persistent0_.token_date as token_da3_3_0_, persistent0_.token_value as token_va4_3_0_, persistent0_.user_id as user_id6_3_0_, persistent0_.user_agent as user_age5_3_0_, user1_.id as id1_4_1_, user1_.created_by as created_2_4_1_, user1_.created_date as created_3_4_1_, user1_.last_modified_by as last_mod4_4_1_, user1_.last_modified_date as last_mod5_4_1_, user1_.activated as activate6_4_1_, user1_.activation_key as activati7_4_1_, user1_.email as email8_4_1_, user1_.first_name as first_na9_4_1_, user1_.lang_key as lang_ke10_4_1_, user1_.last_name as last_na11_4_1_, user1_.login as login12_4_1_, user1_.password_hash as passwor13_4_1_, user1_.reset_date as reset_d14_4_1_, user1_.reset_key as reset_k15_4_1_ from jhi_persistent_token persistent0_ left outer join jhi_user user1_ on persistent0_.user_id=user1_.id where persistent0_.series=?\r\n2016-12-11 02:32:04.071 DEBUG 8032 --- [ XNIO-2 task-58] m.m.s.CustomPersistentRememberMeServices : No persistent token found for series id: 0Z8DGHQHJy+kJ+6nZ2xsmg==\r\n2016-12-11 02:32:04.074 DEBUG 8032 --- [ XNIO-2 task-58] m.m.s.CustomPersistentRememberMeServices : Cancelling cookie\r\n2016-12-11 02:32:04.076 DEBUG 8032 --- [ XNIO-2 task-58] c.m.myapp.aop.logging.LoggingAspect      : Enter: com.mycompany.myapp.web.rest.ProfileInfoResource.getActiveProfiles() with argument[s] = []\r\n2016-12-11 02:32:04.077 DEBUG 8032 --- [ XNIO-2 task-58] c.m.myapp.aop.logging.LoggingAspect      : Exit: com.mycompany.myapp.web.rest.ProfileInfoResource.getActiveProfiles() with result = com.mycompany.myapp.web.rest.ProfileInfoResource$ProfileInfoResponse@5f89944a\r\n2016-12-11 02:32:04.079 DEBUG 8032 --- [ XNIO-2 task-63] m.m.s.CustomPersistentRememberMeServices : Remember-me cookie detected\r\nHibernate: select persistent0_.series as series1_3_0_, persistent0_.ip_address as ip_addre2_3_0_, persistent0_.token_date as token_da3_3_0_, persistent0_.token_value as token_va4_3_0_, persistent0_.user_id as user_id6_3_0_, persistent0_.user_agent as user_age5_3_0_, user1_.id as id1_4_1_, user1_.created_by as created_2_4_1_, user1_.created_date as created_3_4_1_, user1_.last_modified_by as last_mod4_4_1_, user1_.last_modified_date as last_mod5_4_1_, user1_.activated as activate6_4_1_, user1_.activation_key as activati7_4_1_, user1_.email as email8_4_1_, user1_.first_name as first_na9_4_1_, user1_.lang_key as lang_ke10_4_1_, user1_.last_name as last_na11_4_1_, user1_.login as login12_4_1_, user1_.password_hash as passwor13_4_1_, user1_.reset_date as reset_d14_4_1_, user1_.reset_key as reset_k15_4_1_ from jhi_persistent_token persistent0_ left outer join jhi_user user1_ on persistent0_.user_id=user1_.id where persistent0_.series=?\r\n2016-12-11 02:32:04.086 DEBUG 8032 --- [ XNIO-2 task-63] m.m.s.CustomPersistentRememberMeServices : No persistent token found for series id: 0Z8DGHQHJy+kJ+6nZ2xsmg==\r\n2016-12-11 02:32:04.086 DEBUG 8032 --- [ XNIO-2 task-63] m.m.s.CustomPersistentRememberMeServices : Cancelling cookie\r\n2016-12-11 02:32:04.088 DEBUG 8032 --- [ XNIO-2 task-63] c.m.myapp.aop.logging.LoggingAspect      : Enter: org.springframework.boot.actuate.audit.AuditEventRepository.add() with argument[s] = [AuditEvent [timestamp=Sun Dec 11 02:32:04 MSK 2016, principal=anonymousUser, type=AUTHORIZATION_FAILURE, data={details=org.springframework.security.web.authentication.WebAuthenticationDetails@957e: RemoteIpAddress: 127.0.0.1; SessionId: null, type=org.springframework.security.access.AccessDeniedException, message=Access is denied}]]\r\n2016-12-11 02:32:04.089 DEBUG 8032 --- [ XNIO-2 task-63] c.m.myapp.aop.logging.LoggingAspect      : Exit: org.springframework.boot.actuate.audit.AuditEventRepository.add() with result = null\r\n2016-12-11 02:32:04.089 DEBUG 8032 --- [ XNIO-2 task-63] c.m.m.s.Http401UnauthorizedEntryPoint    : Pre-authenticated entry point called. Rejecting access\r\n\r\nHere is the log form browser:\r\nhttp://localhost:9000/api/authentication?cacheBuster=1481414325497 Failed to load resource: the server responded with a status of 403 (Forbidden)\r\n##### **Motivation for or Use Case**\r\nI cannot login in generated application, so I can't get jhipster's features while developing my application.\r\n\r\n##### **Reproduce the error**\r\n1) Generate application with latest version of jhipster an jhipster's generator:\r\n- session based with spring security\r\n- MySQL database\r\n- spring websocket\r\n- all other options by default\r\n- run application and try to log in as admin/admin\r\n\r\n2) create database and user in MySQL as:\r\n`create database wsnew;\r\n\r\nCREATE USER wsnew@'%' IDENTIFIED BY '1111';\r\nGRANT ALL ON wsnew.* TO wsnew@'%';\r\nFLUSH PRIVILEGES;`\r\n\r\n3) update application-dev.yml config as:\r\n`        url: jdbc:mysql://localhost:3306/wsnew?useUnicode=true&characterEncoding=utf8&useSSL=false\r\n        name:\r\n        username: wsnew\r\n        password: 1111`\r\n\r\n##### **Related issues**\r\nI didn't find any related issues.\r\n\r\n##### **Suggest a Fix**\r\nI guess I do something wrong as this bug is very obvious - and it is impossible that no one reported it.\r\n\r\n##### **JHipster Version(s)**\r\ngenerator-jhipster@3.12.1\r\n\r\n##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**\r\n{\r\n  \"generator-jhipster\": {\r\n    \"jhipsterVersion\": \"3.12.1\",\r\n    \"baseName\": \"wsnew\",\r\n    \"packageName\": \"com.mycompany.myapp\",\r\n    \"packageFolder\": \"com/mycompany/myapp\",\r\n    \"serverPort\": \"8080\",\r\n    \"authenticationType\": \"session\",\r\n    \"hibernateCache\": \"ehcache\",\r\n    \"clusteredHttpSession\": false,\r\n    \"websocket\": false,\r\n    \"databaseType\": \"sql\",\r\n    \"devDatabaseType\": \"mysql\",\r\n    \"prodDatabaseType\": \"mysql\",\r\n    \"searchEngine\": false,\r\n    \"messageBroker\": false,\r\n    \"buildTool\": \"maven\",\r\n    \"enableSocialSignIn\": false,\r\n    \"rememberMeKey\": \"a8547d84e1c37605ae3ddc12afca1280e2e65413\",\r\n    \"useSass\": true,\r\n    \"applicationType\": \"monolith\",\r\n    \"testFrameworks\": [\r\n      \"gatling\"\r\n    ],\r\n    \"jhiPrefix\": \"jhi\",\r\n    \"enableTranslation\": false\r\n  }\r\n}\r\n\r\n##### **Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**\r\nno entities\r\n\r\n##### **Browsers and Operating System**\r\nWindows 7\r\nChrome Version 54.0.2840.99 m\r\n\r\njava version \"1.8.0_91\"\r\nJava(TM) SE Runtime Environment (build 1.8.0_91-b15)\r\nJava HotSpot(TM) 64-Bit Server VM (build 25.91-b15, mixed mode)\r\n"},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/266697497","html_url":"https://github.com/jhipster/generator-jhipster/issues/4645#issuecomment-266697497","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4645","id":266697497,"user":{"login":"razorvind","id":13865022,"avatar_url":"https://avatars.githubusercontent.com/u/13865022?v=3","gravatar_id":"","url":"https://api.github.com/users/razorvind","html_url":"https://github.com/razorvind","followers_url":"https://api.github.com/users/razorvind/followers","following_url":"https://api.github.com/users/razorvind/following{/other_user}","gists_url":"https://api.github.com/users/razorvind/gists{/gist_id}","starred_url":"https://api.github.com/users/razorvind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/razorvind/subscriptions","organizations_url":"https://api.github.com/users/razorvind/orgs","repos_url":"https://api.github.com/users/razorvind/repos","events_url":"https://api.github.com/users/razorvind/events{/privacy}","received_events_url":"https://api.github.com/users/razorvind/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T10:05:12Z","updated_at":"2016-12-13T10:05:12Z","body":"I really used AdBlock and Symantec Endpoint Protection (cant' turn it off due to company policy).\r\nSo I cannot login in Chrome while turning off the AdBlock plugin.\r\nBut the good news is I managed to login with Firefox 50.0.2\r\nSeems like there some problem with my Chrome like @jdubois said.\r\n\r\nActually the reason of my investigation - some WebSocket errors, so I've updated jhipster and generated new application to make sure I didn't miss anything. \r\nThe error I'm talking about is \"WebSocket connection to 'ws://localhost:9000/websocket/tracker/998/10vfea54/websocket' failed: Connection closed before receiving a handshake response\" - and seems like it Browser Sync issue https://github.com/BrowserSync/browser-sync/issues/780\r\nWhile starting front end without browser sync (in my work project: node server.js) - I see no errors.\r\n\r\nI believe you can close this ticket.\r\nOur project used jhipster as start point a yesr ago works fine (even in my Chrome :) ) - thank you jhipster team! We really saved lots of time!"}}
{"actor":{"display_login":"razorvind"}}